<template>
    <div class="on-siteInspection-div-5"  :key="onSiteInspectionKey" id="sceneInspect-guide-box">
        <a-spin tip="正在加载中..." :spinning="onSiteInspectionSpinning">
            <div style="width: 100%;margin: 0px auto 5px auto;display: flex;align-items: flex-end" v-if="!currentRow.isTopTabs">
                <div style="flex: 1;margin-top: 1px;" >
                    <div class="process-handling-card on-siteInspection-top-tabs" v-if="currentRow.isZZState" >
                        <a-tabs type="card" v-model:activeKey="currentSteps" @change="stepsChange">
                            <a-tab-pane :key="0" tab="首次会议"></a-tab-pane>
                            <a-tab-pane :key="1" tab="审评记录"></a-tab-pane>
                            <a-tab-pane :key="2" tab="审评报告"></a-tab-pane>
                            <a-tab-pane :key="3" tab="末次会议"></a-tab-pane>
                            <a-tab-pane :key="4" tab="申请报销"></a-tab-pane>
                        </a-tabs>
                    </div>
                    
                    <div class="process-handling-card on-siteInspection-top-tabs" v-else ><!-- 组员 -->
                        <a-tabs type="card" v-model:activeKey="currentSteps" @change="stepsChange">
                            <a-tab-pane :key="1" tab="审评记录"></a-tab-pane>
                            <a-tab-pane :key="2" tab="审评报告"></a-tab-pane>
                            <a-tab-pane :key="4" tab="申请报销"></a-tab-pane>
                        </a-tabs>
                    </div>
                    
                    <!-- <a-steps :current="currentSteps" size="small" v-if="currentRow.isZZState" @change="stepsChange">
                        <a-step title="首次会议" >
                            <div slot="icon" class="steps-item-icon-box">1</div>
                        </a-step>
                        <a-step title="审评记录">
                            <div slot="icon" class="steps-item-icon-box">2</div>
                        </a-step>
                        <a-step title="审评报告">
                            <div slot="icon" class="steps-item-icon-box">3</div>
                        </a-step>
                        <a-step title="末次会议">
                            <div slot="icon" class="steps-item-icon-box">4</div>
                        </a-step>
                    </a-steps> -->
                    
                    <!-- <a-steps :current="currentSteps" size="small" v-else @change="stepsChange">
                        <a-step title="首次会议" v-show="false">
                            <div slot="icon" class="steps-item-icon-box">0</div>
                        </a-step>
                        <a-step title="审评记录">
                            <div slot="icon" class="steps-item-icon-box">1</div>
                        </a-step>
                        <a-step title="审评报告">
                            <div slot="icon" class="steps-item-icon-box">2</div>
                        </a-step>
                    </a-steps> -->
                </div>
                
                <div style="display: flex;align-items: center;justify-content: flex-end;padding:0px 0px 2px 16px;border-bottom: 1px solid #38f;">
                    <!-- 后期要去掉 -->
                    <div @click="guideClick()" style="margin-right: 5px;width: 50px;height: 20px;color: #f4f7fc;">触发指南</div>
                    <a-button v-if="(currentRow.isZZState && currentSteps == 3)" style="margin-right: 10px;" class="blue-btn" type="primary" @click="submitOnSite('spcysubmitFlow')" icon="check-circle">提交技术审评并发起整改</a-button>
                    <div class="onSiteInspection-btn-box">
                        <!-- <vxe-pulldown ref="pulldownpjRef" destroy-on-close>
                            <template #default>
                                <div style="position: relative;" >
                                    <span class="tips-jb-box" v-if="jxkpJobList.length || rckpJobList.length">
                                        {{ jxkpJobList.length && rckpJobList.length?2:(jxkpJobList.length || rckpJobList.length?1:'') }}
                                    </span>
                                    <a-button class="blue-btn" type="primary" icon="message" @click="pendingEvaluationClick()">待办评价</a-button>
                                </div>
                            </template>
                            <template #dropdown>
                                <div style=" width: 95px;background-color: #fff;box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);">
                                    <div class="pending-evaluation-item" v-if="jxkpJobList.length" @click="assessment('见习考评',jxkpJobList[0])">
                                        <span class="text-box" >见习考评</span>
                                        <a-icon type="right" />
                                    </div>
                                    <div class="pending-evaluation-item" v-if="rckpJobList.length" @click="assessment('日常考评',rckpJobList[0])">
                                        <span class="text-box" >日常考评</span>
                                        <a-icon type="right" />
                                    </div>
                                </div>
                            </template>
                        </vxe-pulldown> -->
                        
                        <a-button class="ant-btn-background-ghost" style="margin-left: 10px;" @click="inspectionPlanMaterialsClick()" icon="profile" type="dashed">审评方案材料</a-button>
                        <a-button v-if="false" style="margin-left: 10px;" @click="rectificationClick('pushQyBcZgNotice')" icon="profile">发起整改</a-button>
                        <a-button v-if="false" style="margin-left: 10px;" @click="historyListClick('querySqsxBczgjlHistoryList')" icon="clock-circle">整改历史记录</a-button>
                        <!-- <a-button v-if="!currentRow.bxsqBtn" style="margin-left: 10px;" class="blue-btn" type="primary" @click="reimburseClick(currentRow)">申请报销</a-button> -->
                        <!-- <a-button v-if="false" style="margin-left: 10px;" class="blue-btn" type="primary" icon="interaction" @click="internalTransferClick('spcytransferFlowJob')">内部转办</a-button> -->
                    </div>
                    <div style="margin-left: 15px;display: flex;">
                        <a-button @click="refreshClick()" icon="reload">刷新</a-button>
                        <div id="pmqh-box" >
                            <a-tooltip v-if="screenVisible" v-model:visible="screenVisible" placement="left">
                                <template slot="title">
                                    <div style="padding:0 15px;font-size: 16px;">点击按钮和按F11都可打开全屏或退出全屏</div>
                                </template>
                                <a-button class="blue-btn" type="primary" style="margin-left: 10px;" @click="getFullscreen(screenSate?'退出全屏':'打开全屏')" :icon="screenSate?'fullscreen-exit':'fullscreen'">{{screenSate?'退出全屏':'打开全屏'}}</a-button>
                            </a-tooltip>
                            <a-button v-else class="blue-btn" type="primary" style="margin-left: 10px;" @click="getFullscreen(screenSate?'退出全屏':'打开全屏')" :icon="screenSate?'fullscreen-exit':'fullscreen'">{{screenSate?'退出全屏':'打开全屏'}}</a-button>
                        </div>
                    </div>
                </div>
            </div>
            
            <div style="display: flex;border: 1px solid #38f;padding: 5px;margin-top: -5px;border-top: none;" :style="{border:currentRow.comprehensiveBorder?'none':'1px solid #38f'}" >
                <div id="jcbg-dwcbg-box" class="sceneInspect-left-bgBox" v-if="currentSteps == 2 && currentRow.fhbsxzt == 1 && reportStatus">
                    <div class="left-bgBox-top" style="display: flex;align-items: center;" @click="reportStatus = !reportStatus">
                        <span class="title">待完成报告</span>
                        <a-icon type="double-right" />
                    </div>
                    <div style="padding:5px;height: calc(100vh - 246px);overflow-y: auto;">
                        <div
                        class="left-bgBox-item" 
                        :class="item.sqsxid == selectReportItem.sqsxid?'select-left-bgBox-item':''"  
                        v-for="(item,index) in reportList" :key="index"
                        @click="selectReportClick(item,index)"
                        >
                            <span>{{item.order}}</span>.
                            <span>{{ item.bgmc }}</span>
                        </div>
                    </div>
                </div>
                <div style="flex:1;" >
                    <div v-if="!currentRow.isTopTabs" style="display: flex;align-items: flex-end;">
                        <div  style="padding-right: 15px;border-bottom: 1px solid #38f;" v-if="!reportStatus && currentRow.fhbsxzt == 1 && currentSteps == 2" >
                            <div id="jcbg-dwcbg-box-0" class="left-bgBox-top bgmc-bgBox-box" style="display: flex;align-items: center;margin-bottom: 0;border: 1px solid #d9d9d9;font-size: 16px;border-bottom: none;" @click="reportStatus = !reportStatus">
                                <span class="title">{{ selectReportItem.bgmc }}</span>
                                <a-icon type="double-left" />
                            </div>
                        </div>
                        <div class="process-handling-card" v-if="!currentRow.isTopTabs && currentSteps == 2" style="flex: 1;" >
                            <a-tabs type="card" v-model:activeKey="activeKey" @change="tabPaneChange">
                                <!-- <a-tab-pane key="会议签到" tab="会议签到"></a-tab-pane> -->
                                <!-- <a-tab-pane key="审评方案拟定" tab="审评方案拟定"></a-tab-pane> -->
                                <a-tab-pane key="审评情况描述" tab="审评情况描述"></a-tab-pane>
                                <a-tab-pane key="发现缺陷情况" tab="发现缺陷情况"></a-tab-pane>
                                <a-tab-pane v-if="currentRow.isZZState" key="审评结论及其他说明" tab="审评结论及其他说明"></a-tab-pane>
                                <!-- <a-tab-pane v-if="currentRow.isZZState" key="审评报告" tab="审评报告制作"></a-tab-pane>
                                <a-tab-pane v-if="currentRow.isZZState" key="缺陷报告" tab="缺陷报告制作"></a-tab-pane> -->
                                <!-- <a-tab-pane v-if="currentRow.isZZState" key="技术审评材料汇总" tab="技术审评材料汇总"></a-tab-pane> -->
                                <!-- <a-tab-pane v-if="currentRow.isZZState" key="材料审查" tab="材料审查"></a-tab-pane> -->
                                <!-- <a-tab-pane key="申请信息" tab="事项信息"></a-tab-pane> -->
                                <!-- <a-tab-pane key="环节流转记录" tab="流转记录"></a-tab-pane> -->
                            </a-tabs>
                        </div>
                        <div
                            v-if="!dataViewingStatus && currentSteps == 2" 
                            class="left-bgBox-top" style="display: flex;align-items: center;width: 150px;margin-bottom: 0;border: 1px solid #d9d9d9;font-size: 16px;border-bottom: 1px solid #38f;" 
                            @click="dataViewingStatus = !dataViewingStatus;completedIssueKey = Date.now()"
                            id="jcbg-ckzl-box"
                        >
                            <div >
                                <a-icon type="double-right" />
                            </div>
                            <span class="title" style="text-align: right">查看资料</span>
                        </div>
                    </div>
                    <div
                    class="on-siteInspection-content" 
                    :style="{height: currentRow.boxHeight? 
                        'calc(100vh - '+currentRow.boxHeight+'px)':
                        (currentRow.isTopTabs?'calc(100vh - '+168+'px)':
                        (currentSteps == 2?'calc(100vh - '+150+'px)':'calc(100vh - '+119+'px)')),
                        padding: currentRow.isTopTabs?'0':'8px',border:currentSteps == 2?'1px solid #38f':''
                        }">
                        <!-- border:currentRow.isTopTabs?'none': '1px solid #38f',borderTop: currentSteps == 2?'0 !important':'1px solid #38f !important', -->
                        <div v-if="activeKey == '审评情况描述'&&currentSteps == 2" :key="reportTabKey" class="situation-description-box">
                            <a-spin tip="正在加载中..." :spinning="situationDescriptionSpinning">
                                <span class="save-tips situation-tip">（所有编辑提示：编辑完成，鼠标移开输入框以后系统会自动保存）</span>
                                <div>
                                    <!-- <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="selectDescribe()" icon="check-circle">选择描述模板</a-button> -->
                                    <!-- <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="saveData('fjcqkzs',selectReportItem.fjcqkzs)" icon="folder">保存</a-button> -->
                                    <!-- <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="addDescribe()" icon="folder">保存为描述模板</a-button> -->
                                </div>
                                <div class="situation-description-list" >
                                    <div v-for="(item,index) in situationDescriptionList" :key="index" class="situation-item-box" v-if="(index == 0 && currentRow.isZZState) || index !== 0">
                                        <div class="si-top-box">
                                            <div style="flex:1;">
                                                <span class="situation-left-title" >{{ item.dxXh }}</span>
                                                <span class="situation-left-title" @click="situationVisible(item,index,1)">{{item.fzjmc}}<span v-if="index !== 0"></span> </span>
                                                <span
                                                    v-if="item.fwczt"
                                                    style="font-size:12px;border:1px solid #ED5566;border-radius:10px;padding:0 6px;" 
                                                    :style="{color:item.fwczt == '已完成'?'#05e659':'#ED5566',borderColor:item.fwczt == '已完成'?'#05e659':'#ED5566',}"
                                                >{{item.fwczt}}</span>
                                            </div>
                                            <div style="display:flex;align-items:center;">
                                                <div v-if="index == 0" >
                                                    <a-button id="qkms-tqmub-btn" style="margin-right:5px;" size="small" class="blue-btn" type="primary" @click="extractTemplateClick(item,index,1)" icon="up-circle">提取模板</a-button>
                                                    <a-button id="qkms-bcmb-btn" style="margin-right:5px;" size="small" class="blue-btn" type="primary" @click="saveTemplateClick(item,index,1)" icon="file-done">保存模板</a-button>
                                                    <a-button id="qkms-wc-btn" style="margin-right:5px;" v-if="item.fwczt == '未完成'" size="small" class="green-l2-btn" type="primary" @click="situationComplete(item,index,1)" icon="check-circle">完成</a-button>
                                                    <a-button id="qkms-cxbj-btn" style="margin-right:5px;" v-if="item.fwczt == '已完成'" size="small" class="blue-btn" type="primary" @click="situationReEdit(item,index,1)" icon="form">重新编辑</a-button>
                                                </div>
                                                <span v-if="item.isVisible" style="display:flex;align-items:center;justify-content:flex-end;color:#38f;" @click="situationVisible(item,index,1)">
                                                    <span style="padding-right:3px">折叠   </span>
                                                    <a-icon type="down" />
                                                </span>
                                                <span v-if="!item.isVisible" style="display:flex;align-items:center;justify-content:flex-end;color:#38f;" @click="situationVisible(item,index,1)">
                                                    <span style="padding-right:3px">展开</span>
                                                    <a-icon type="up" />
                                                </span>
                                            </div>
                                        </div>
                                        <div class="situation-bottom-v" v-if="index == 0 && (item.isVisible || item.fwczt !== '已完成')">
                                            <commpKindeditor
                                                v-if="item.fwczt == '未完成'"
                                                id="fjcqkzs_id" 
                                                height="500px" 
                                                width="100%" 
                                                :content.sync="selectReportItem.fjcqkzs"
                                                :afterChange="()=>{return selectReportItem.fjcqkzs}"
                                                @afterBlur="fjcqkzsAfterBlur('fjcqkzs',selectReportItem.fjcqkzs)"
                                                :loadStyleMode="false"
                                            ></commpKindeditor>
                                            <div v-else v-html="selectReportItem.fjcqkzs" ></div>
                                        </div>
                                        <div class="situation-bottom-v" v-if="index == 1 && item.isVisible" >
                                            <div v-for="(trem,tIndex) in twoDescriptionList" :key="tIndex" class="situation-item-box" >
                                                <div class="si-top-box">
                                                    <div style="flex:1;">
                                                        <span class="situation-left-title" >{{ trem.dxXh }}</span>
                                                        <span class="situation-left-title" @click="situationVisible(trem,tIndex)">{{trem.fzjmc}}<span ></span> </span>
                                                        <span
                                                            v-if="trem.fwczt"
                                                            style="font-size:12px;border:1px solid #ED5566;border-radius:10px;padding:0 6px;" 
                                                            :style="{color:trem.fwczt == '已完成'?'#05e659':'#ED5566',borderColor:trem.fwczt == '已完成'?'#05e659':'#ED5566',}"
                                                        >{{trem.fwczt}}</span>
                                                    </div>
                                                    <div style="display:flex;align-items:center;">
                                                        <div>
                                                            <a-button :id="tIndex == 0?'qkms-tqmub-btn-0':''" style="margin-right:5px;" size="small" class="blue-btn" type="primary" @click="extractTemplateClick(trem,tIndex)" icon="up-circle">提取模板</a-button>
                                                            <a-button :id="tIndex == 0?'qkms-bcmb-btn-0':''" style="margin-right:5px;" size="small" class="blue-btn" type="primary" @click="saveTemplateClick(trem,tIndex)" icon="file-done">保存模板</a-button>
                                                            <a-button :id="tIndex == 0?'qkms-wc-btn-0':''" style="margin-right:5px;" v-if="trem.fwczt == '未完成'" size="small" class="green-l2-btn" type="primary" @click="situationComplete(trem,tIndex)" icon="check-circle">完成</a-button>
                                                            <a-button :id="tIndex == 0?'qkms-cxbj-btn-0':''" style="margin-right:5px;" v-if="trem.fwczt == '已完成'" size="small" class="blue-btn" type="primary" @click="situationReEdit(trem,tIndex)" icon="form">重新编辑</a-button>
                                                        </div>
                                                        <span v-if="trem.isVisible" style="display:flex;align-items:center;justify-content:flex-end;color:#38f;" @click="situationVisible(trem,tIndex)">
                                                            <span style="padding-right:3px">折叠   </span>
                                                            <a-icon type="down" />
                                                        </span>
                                                        <span v-if="!trem.isVisible" style="display:flex;align-items:center;justify-content:flex-end;color:#38f;" @click="situationVisible(trem,tIndex)">
                                                            <span style="padding-right:3px">展开</span>
                                                            <a-icon type="up" />
                                                        </span>
                                                    </div>
                                                </div>
                                                <div class="situation-bottom-v" v-if="trem.isVisible || trem.fwczt !== '已完成'">
                                                    <commpKindeditor
                                                        v-if="trem.fwczt == '未完成'"
                                                        :id="'situationzj_id'+tIndex" 
                                                        height="200px" 
                                                        width="100%" 
                                                        :content.sync="trem.fjcms"
                                                        :afterChange="()=>{}"
                                                        @afterBlur="$event=>{zjqkmsBlur(trem,tIndex,'fjcms',$event)}"
                                                        :loadStyleMode="false"
                                                    ></commpKindeditor>
                                                    <div v-else v-html="trem.fjcms" ></div>
                                                </div>
                                            </div>
                                            <div v-if="!twoDescriptionList.length">
                                                <a-empty description="暂无数据！"/>
                                            </div>
                                        </div>
                                        
                                    </div>
                                </div>
                                <div v-if="!situationDescriptionList.length || (situationDescriptionList.length == 1 && !currentRow.isZZState)">
                                    <a-empty description="暂无数据！"/>
                                </div>
                            </a-spin>
                        </div>
                        <div v-show="activeKey == '发现缺陷情况' && !DefectReportStateData.state && currentSteps == 2" style="position: relative;" :key="reportTabKey">
                            <div class="chapter-tabs-content">
                                <a-spin tip="正在加载中..." :spinning="addwtSpinning">
                                    <div style="display: flex;justify-content: flex-end;margin-bottom: 5px;">
                                        <!-- <div style="display:flex;justify-content:flex-start;flex:1;align-items:center;">
                                            <span 
                                                style="display: inline-block; text-align: center; font-weight: 600; font-size: 16px;line-height:32px;
                                                padding-left:5px;font-family: simHei; color: rgba(0, 0, 0, 0.85);background-color: #e6f7ff;height:32px;
                                                "
                                            >
                                                发现人员：
                                            </span>
                                            <a-select :default-value="PersonnelDiscoveredRow.userid" style="margin-right:10px;" @change="PersonnelDiscoveredChange">
                                                <a-select-option v-for="(item,index) in PersonnelDiscoveredProblemList" :key="item.userid">
                                                    {{item.name}}
                                                </a-select-option>
                                            </a-select>
                                        </div> -->
                                        <!-- <a-button v-if="currentRow.isZZState" style="margin-right: 10px;" class="blue-btn" type="primary" @click="addproblem" icon="plus">添加问题</a-button> -->
                                        <a-button id="fxqxqk-tjwt-btn" style="margin-right: 10px;" class="blue-btn" type="primary" @click="addzyproblem" icon="plus">添加问题</a-button>
                                        <a-button id="fxqxqk-scbg-btn" v-if="currentRow.isZZState" class="green-l2-btn" type="primary" @click="completeDefectDescriptionClick('完成')" icon="check-circle">完成并生成缺陷报告</a-button>
                                        <!-- <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="problemBaseSelect()" icon="check-circle">选择历史库</a-button> -->
                                        
                                    </div>
                                </a-spin>
                                <div class="chapterIssues-box">
                                    <div>
                                        <a-spin tip="正在加载中..." :spinning="chapterIssuesSpinning">
                                            <div :key="chapterIssuesKey">
                                                <div :key="chapterIssuesKey" v-if="chapterIssuesList.length">
                                                    <div v-for="(item,index) in chapterIssuesList" :key="index" >
                                                        <div style="font-size: 16px;" class="discover-problems-item-box" >
                                                            <div style="display: flex;justify-content: space-between;">
                                                                <div style="display:flex;align-items:center;flex-wrap: wrap;">
                                                                    <span class="problem-title">问题 </span><!-- {{item.wt.forder}} -->
                                                                    <span style="padding: 0 3px;margin-right:8px;color:#fff;background:#1ab348;font-size:12px;display:inline-block;" v-if="currentRow.isZZState || (item.wt.fcjryid == nowUserId) ?false:true">只读</span> 
                                                                    <span style="color: #faad14;font-size: 14px;font-weight: 600;" >缺陷类型：</span>
                                                                    <a-select :disabled="currentRow.isZZState || (item.wt.fcjryid == nowUserId) ?false:true" v-model="item.wt.fyzcd" @change="severityChange(item.wt,'fyzcd')" style="width: 110px;margin-right: 10px;" placeholder="请选择严重程度">
                                                                        <a-select-option value="一般缺陷">一般缺陷</a-select-option>
                                                                        <a-select-option value="主要缺陷">主要缺陷</a-select-option>
                                                                        <a-select-option value="严重缺陷">严重缺陷</a-select-option>
                                                                    </a-select>
                                                                    <!-- 删除问题 -->
                                                                    <div style="display:flex;justify-content:flex-start;flex:1;align-items:center;">
                                                                        <span 
                                                                            style="display: inline-block; text-align: center; font-weight: 600; font-size: 16px;line-height:32px;
                                                                            padding-left:5px;font-family: simHei; color: rgba(0, 0, 0, 0.85);background-color: #e6f7ff;height:32px;
                                                                            width: 85px;
                                                                            "
                                                                        >
                                                                            发现人员：
                                                                        </span>
                                                                        <a-select mode="multiple" :default-value="item.wt && item.wt.ffxryid?item.wt.ffxryid.split(','):[]" :disabled="currentRow.isZZState?false:true" style="margin-right:10px;min-width:113px;" @change="$event=>{chapterIssuesChange(item,index,$event)}">
                                                                            <a-select-option v-for="(trem,tIndex) in PersonnelDiscoveredProblemList" :key="trem.userid" v-if="tIndex">
                                                                                {{trem.name}}
                                                                            </a-select-option>
                                                                        </a-select>
                                                                    </div>
                                                                    <a-button v-if="currentRow.isZZState || (item.wt.fcjryid == nowUserId)" size="small" class="red-btn" type="primary" @click="deleteWTClick(item)" style="margin-right: 10px;" icon="delete">删除</a-button>
                                                                    <a-button v-if="currentRow.isZZState || (item.wt.fcjryid == nowUserId)" class="green-l2-btn" type="primary" @click="ProblemCompletedClick('完成',item)" icon="check-circle">完成</a-button>
                                                                </div>
                                                            </div>
                                                            <div class="fxqxgk-box-v">
                                                                <span style="color: #5ca3e5;font-size: 14px;font-weight: 600;" >对应报告章节：</span>
                                                                <a-select style="flex: 1;" v-model="item.wt.fxcjczjid" @change="severityChange(item.wt,'fxcjczjid')" placeholder="请选择对应报告章节">
                                                                    <a-select-option v-for="(item,index) in fxwtXmList" :value="item.fxcjczjid" :key="index">{{ item.fzjmc }}</a-select-option>
                                                                </a-select>
                                                            </div>
                                                            <!-- style="border: 1px solid #d9d9d9;margin: 5px 0;" -->
                                                            <div style="width: 100%;margin-top:5px;">
                                                                <div class="qxms-box" >
                                                                    <div class="wt-item-top-box" style="height:30px;line-height:30px;">
                                                                        <span class="tips-box">*</span>
                                                                        <span class="wt-item-title">缺陷描述 </span>
                                                                    </div>
                                                                    <a-textarea 
                                                                        @blur="currentRow.isZZState || (item.wt.fcjryid == nowUserId) ?severityChange(item.wt,'fwtms'):()=>{}"
                                                                        :readOnly="currentRow.isZZState || (item.wt.fcjryid == nowUserId) ?false:true"
                                                                        v-model:value="item.wt.fwtms"
                                                                        placeholder="请输入缺陷描述"
                                                                        :autosize="{ minRows: 5, maxRows: 5 }"
                                                                    ></a-textarea>
                                                                </div>
                                                                <div class="qxyj-box" >
                                                                    <div class="wt-item-top-box">
                                                                        <span class="tips-box">*</span>
                                                                        <span class="wt-item-title">缺陷依据</span>
                                                                        <a-button v-if="currentRow.isZZState || (item.wt.fcjryid == nowUserId)" size="small" icon="select" style="margin-left: 15px;" class="blue-btn" type="primary" @click="selectTermItem(item,{})" >选择对应依据</a-button>
                                                                    </div>
                                                                    <div class="qxyj-content">
                                                                        <div v-for="(trem,tIndex) in item.tkList" :key="tIndex">
                                                                            <div 
                                                                            style="border-top: 1px solid #d9d9d9;border-bottom: 1px solid #d9d9d9;
                                                                            padding: 3px 10px;display: flex;justify-content: space-between;align-items: center;"
                                                                            >
                                                                                <span>对应依据：
                                                                                    <span style="color: #000;font-weight: 500;">{{ trem.tk }}</span>
                                                                                </span>
                                                                            </div>
                                                                        </div>
                                                                        <div v-if="!item.tkList.length" style="text-align: center;font-size: 14px;" >
                                                                            <a-empty description="暂无对应依据..."/>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <!-- <div v-else style="margin-top: 30px;">
                                                    <a-empty />
                                                </div> -->
                                                <div class="situation-description-box">
                                                    <div class="situation-item-box" id="fxqxqk-ywcwt-box" >
                                                        <div class="si-top-box"  >
                                                            <div style="flex:1;">
                                                                <span class="situation-left-title" @click="completedProblemState = !completedProblemState">已完成问题</span>
                                                            </div>
                                                            <div style="display:flex;align-items:center;">
                                                                <span v-if="completedProblemState" style="display:flex;align-items:center;justify-content:flex-end;color:#38f;" @click="completedProblemState = !completedProblemState">
                                                                    <span style="padding-right:3px">折叠</span>
                                                                    <a-icon type="down" />
                                                                </span>
                                                                <span v-if="!completedProblemState" style="display:flex;align-items:center;justify-content:flex-end;color:#38f;" @click="completedProblemState = !completedProblemState">
                                                                    <span style="padding-right:3px">展开</span>
                                                                    <a-icon type="up" />
                                                                </span>
                                                            </div>
                                                        </div>
                                                        <div class="situation-bottom-v" v-if="completedProblemState" style="width: 100%;overflow-x: auto;" >
                                                            <commpVxeTable
                                                                :key="completedIssueKey"
                                                                ref="completedIssueRef"
                                                                :isCanWrap="true"
                                                                :adaptiveHeight="true"
                                                                :config="completedIssueTableConfig" 
                                                                :columns="completedIssueColumnsVxe" 
                                                                :formItem="completedIssueformItem"
                                                                tablePadding="0"
                                                            >

                                                                <template v-slot:forder_name="{row}">
                                                                    <a-input-number style="width: 45px;" id="inputNumber_forder_name" v-model="row.wt.forder" :min="1" :precision="0" @blur="fxwtForderBlur(row.wt,row.wt.forder)" />
                                                                </template>
                                                                <template v-slot:fyzcd_name="{row}">
                                                                    {{row.wt.fyzcd}}
                                                                </template>
                                                                <template v-slot:fwtms_name="{row}">
                                                                    {{row.wt.fwtms}}
                                                                </template>
                                                                <template v-slot:tkList_name="{row}">
                                                                    <div v-for="(item,index) in row.tkList" :key="index" style="display:flex;justify-content:flex-start;">
                                                                        {{item.tk}}
                                                                    </div>
                                                                </template>
                                                                <template v-slot:zjmc_name="{row}">
                                                                    {{row.wt.fxcjczjmc}}
                                                                </template>
                                                                <template v-slot:ffxryxm_name="{row}">
                                                                    {{row.wt.ffxryxm}}
                                                                </template>
                                                                <template v-slot:operation_btn="{row}">
                                                                    <a-form layout="inline" class="search-form" >
                                                                        <a-form-item>
                                                                            <a-button v-if="currentRow.isZZState || (row.wt.fcjryid == nowUserId)" size="small" class="blue-btn" type="primary" @click="ProblemCompletedClick('重新编辑',row)" icon="form">重新编辑</a-button>
                                                                        </a-form-item>
                                                                        <a-form-item>
                                                                            <a-button v-if="currentRow.isZZState || (row.wt.fcjryid == nowUserId)" size="small" class="red-btn" type="primary" @click="deleteWTClick(row)" icon="delete">删除</a-button>
                                                                        </a-form-item>
                                                                        
                                                                    </a-form>
                                                                </template>
                                                            </commpVxeTable>
                                                        </div>
                                                    </div>
                                                </div>
                                                <a-drawer
                                                    title="问题历史库"
                                                    placement="right"
                                                    :closable="true"
                                                    :visible="problemHistoryVisible"
                                                    @close="problemHistoryVisible = false"
                                                    width="60%"
                                                >
                                                    <div :key="problemHistoryKey">
                                                        <div>
                                                            <!-- size="small" -->
                                                            <a-input-search
                                                                :key="problemHistoryKey"
                                                                placeholder="请输入关键字"
                                                                enter-button="搜索"
                                                                @search="onSearchProblemHistory"
                                                            />
                                                        </div>
                                                        <div style="height: calc(100vh - 167px);overflow-y: auto;">
                                                            <a-list :data-source="problemHistoryList" :loading="problemHistoryLoading">
                                                                <a-list-item slot="renderItem" slot-scope="item, index" :key="index">
                                                                    <div style="width: 300px;">{{ item.fwtms }}</div>
                                                                    <span>{{ item.fzdyzh }}</span>
                                                                    <div slot="actions">
                                                                        <a-button v-if="index !== 0" size="small" class="blue-btn" type="primary" @click="SelectproblemHistory(item)">选择</a-button>
                                                                        <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                                                    </div>
                                                                </a-list-item>
                                                            </a-list>
                                                        </div>
                                                        <a-pagination
                                                        v-if="totalDescribe"
                                                        :key="paginationKey"
                                                        show-size-changer
                                                        v-model="paginationDescribe.pageNo" 
                                                        :default-current="paginationDescribe.pageNo"
                                                        :total="totalDescribe" 
                                                        :page-size="paginationDescribe.pageSize"
                                                        @change="paginationChange"
                                                        @showSizeChange="paginationChange" />
                                                    </div>
                                                </a-drawer>
                                                <a-drawer
                                                    title="选择条款"
                                                    placement="right"
                                                    :closable="true"
                                                    :visible="termItemVisible"
                                                    @close="termItemVisible = false"
                                                    width="60%"
                                                >
                                                    <div :key="termItemKey">
                                                        <div>
                                                            <!-- size="small" -->
                                                            <a-input-search
                                                                :key="termItemKey"
                                                                placeholder="请输入关键字"
                                                                enter-button="搜索"
                                                                @search="onSearchTermItem"
                                                            />
                                                        </div>
                                                        <div style="height: calc(100vh - 167px);overflow-y: auto;">
                                                            <a-list :data-source="termItemList" :loading="termItemLoading">
                                                                <a-list-item slot="renderItem" slot-scope="item, index" :key="index" :style="{backgroundColor:currentTerms.trem.ftkid == item.id?'#d9d9d9':''}">
                                                                    <div style="width: 300px;">{{ item.fzdyznr }}</div>
                                                                    <span>{{ item.fzdyzh }}</span>
                                                                    <div slot="actions">
                                                                        <!-- {{ item }}
                                                                        <br/>
                                                                        {{ currentTerms.trem }}
                                                                        <br/> -->
                                                                        <a-button v-if="index !== 0" size="small" class="blue-btn" type="primary" @click="SelectTermItemItem(item)">选择</a-button>
                                                                        <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                                                    </div>
                                                                </a-list-item>
                                                            </a-list>
                                                        </div>
                                                        <a-pagination
                                                        v-if="totalDescribe"
                                                        :key="paginationKey"
                                                        show-size-changer
                                                        v-model="paginationDescribe.pageNo" 
                                                        :default-current="paginationDescribe.pageNo"
                                                        :total="totalDescribe" 
                                                        :page-size="paginationDescribe.pageSize"
                                                        @change="paginationChange"
                                                        @showSizeChange="paginationChange" />
                                                    </div>
                                                </a-drawer>
                                            </div>
                                        </a-spin>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div v-show="activeKey == '审评结论及其他说明' && !InspectionReportStateData.state && currentSteps == 2" :key="reportTabKey">
                            <div class="situation-description-box">
                                <span class="save-tips situation-tip">（所有编辑提示：编辑完成，鼠标移开输入框以后系统会自动保存）</span>
                                <div style="display:flex;align-items:center;justify-content:flex-end;margin: 5px 0;">
                                    <a-button id="jcjl-scjl-btn" style="margin-right: 15px;" class="blue-btn" type="primary" @click="generateConclusion('fcyjl',selectReportItem.fcyjl)" icon="check-circle">生成结论</a-button>
                                    <a-button id="jcjl-scjcbg-btn" style="margin-right: 15px;" class="green-l2-btn" type="primary" @click="completeInspectionReportClick('完成')" icon="check-circle">完成并生成审评报告</a-button>
                                    <!-- <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="saveData('fcyjl',selectReportItem.fcyjl)" icon="folder">保存</a-button> -->
                                </div>
                                <div >
                                    <div v-for="(item,index) in ConclusionExplanationList" :key="index" class="situation-item-box">
                                        <div class="si-top-box">
                                            <div style="flex:1;">
                                                <span class="situation-left-title" @click="ConclusionVisible(item,index)">{{item.fzjmc}}</span>
                                            </div>
                                            <div style="display:flex;align-items:center;">
                                                <span v-if="item.isVisible" style="display:flex;align-items:center;justify-content:flex-end;color:#38f;" @click="ConclusionVisible(item,index)">
                                                    <span style="padding-right:3px">折叠</span>
                                                    <a-icon type="down" />
                                                </span>
                                                <span v-if="!item.isVisible" style="display:flex;align-items:center;justify-content:flex-end;color:#38f;" @click="ConclusionVisible(item,index)">
                                                    <span style="padding-right:3px">展开</span>
                                                    <a-icon type="up" />
                                                </span>
                                            </div>
                                        </div>
                                        <div class="situation-bottom-v" v-if="item.key == 'fcyjl' && item.isVisible">
                                            <a-textarea 
                                                :key="reportValKey"
                                                v-model:value="selectReportItem.fcyjl"
                                                @blur="saveData('fcyjl',selectReportItem.fcyjl)"
                                                placeholder="请输入审评结论"
                                                :autosize="{ minRows: 2, maxRows: 50 }"
                                            ></a-textarea>
                                        </div>
                                        <div class="situation-bottom-v" v-if="(item.key !== 'fcyjl' && item.key !== 'fjcqxxm') && item.isVisible">
                                            <a-textarea 
                                                :key="reportValKey"
                                                v-model:value="selectReportItem[item.key]"
                                                @blur="saveData(item.key,selectReportItem[item.key])"
                                                :placeholder="'请输入'+item.fzjmc"
                                                :autosize="{ minRows: 2, maxRows: 50 }"
                                            ></a-textarea>
                                        </div>
                                        <div class="situation-bottom-v" v-if="item.key == 'fjcqxxm' && item.isVisible">
                                            <a-textarea 
                                                :key="reportValKey"
                                                v-model:value="selectReportItem.fjcqxxm"
                                                @blur="saveData('fjcqxxm',selectReportItem.fjcqxxm)"
                                                placeholder="请输入审评缺陷项"
                                                :autosize="{ minRows: 2, maxRows: 50 }"
                                            ></a-textarea>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div v-show="activeKey == '审评结论及其他说明' && InspectionReportStateData.state && currentSteps == 2" :key="reportTabKey">
                            <div v-if="programData.id" :key="programKey">
                                <div style="display:flex;justify-content:space-between;align-items:center;">
                                    <div style="flex:1;">
                                        <a-button
                                        style="margin-right: 15px;" 
                                        class="red-btn" type="primary" 
                                        @click="noteDelete(programData,'结论')" icon="delete">删除</a-button>
                                        <!-- <a-button
                                        style="margin-right: 15px;" 
                                        class="blue-btn" type="primary" 
                                        @click="refreshFile" icon="reload">刷新</a-button>

                                        <a-button
                                        style="margin-right: 15px;" 
                                        class="blue-btn" type="primary" 
                                        @click="downloadFiles(programData)" icon="download">下载签字</a-button>

                                        <a-button
                                        v-if="programData.fwjlx == '.pdf' && programData.fwjlx4 !== '手动上传' "
                                        style="margin-right: 15px;" 
                                        class="blue-btn" type="primary" 
                                        @click="reEdit" icon="form">重新编辑</a-button>

                                        <a-button
                                        v-if="programData.fwjlx !== '.pdf'"
                                        style="margin-right: 15px;" 
                                        class="blue-btn" type="primary" 
                                        @click="saveFiles" icon="folder">保存</a-button>

                                        <a-button
                                        v-if="programData.fwjlx !== '.pdf'"
                                        style="margin-right: 15px;" 
                                        class="blue-btn" type="primary" 
                                        @click="generatePDFClick">生成PDF</a-button>
                                        <a-button 
                                        class="blue-btn" type="primary" 
                                        style="margin-right: 15px;" 
                                        @click="reSelectTemplate" icon="select">重新选择模板</a-button>
                                        <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="inspectionReportUploadCahnge1($event,'技术审评报告')">
                                            <a-button
                                            class="blue-btn" 
                                            type="primary" icon="upload" >上传</a-button>
                                        </a-upload>
                                        <span style="color:#ed5565;" >（上传的文件会替换当前文件）</span> -->
                                    </div>
                                    <a-button 
                                    class="orange-btn" type="primary" 
                                    id="jcjl-cxbjjl-btn"
                                    @click="completeInspectionReportClick('重新编辑')" icon="form">重新编辑结论</a-button>
                                </div>
                                <a-spin tip="正在加载中..." :spinning="programDataSpinning">
                                    <div :key="iframeKey" style="display: flex;justify-content: center;">
                                        <iframe 
                                            v-if="programDataiframeSrc"
                                            :key="iframeKey"
                                            :src="programDataiframeSrc" 
                                            ref="iframeServerEditingRef" 
                                            scrolling="auto" 
                                            width="100%"
                                            :height="(windowInnerHeight -220 )+'px'"
                                            style="border: 0;"
                                        ></iframe>
                                        <div v-else>
                                            <a-empty description="暂无文件或文件发生错误！"/>
                                        </div>
                                    </div>
                                </a-spin>
                                
                                <!-- {{ programData }} -->
                            </div>
                            <div v-if="!programData.id && activeKey == '审评结论及其他说明'">
                                <div style="display:flex;justify-content:space-between;align-items:center;" >
                                    <!-- <span style="color: red;font-weight: 600;">(注：当前暂无审评报告文件，请先选择模板进行审评报告制作)</span> -->
                                    <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,'现场检查报告')">
                                        <a-button
                                        class="blue-btn" 
                                        style="width: 124px;"
                                        type="primary" icon="upload">上传</a-button>
                                    </a-upload>
                                    <a-button 
                                    class="orange-btn" type="primary" 
                                    @click="completeInspectionReportClick('重新编辑')" icon="form">重新编辑结论</a-button>
                                </div>
                                <!-- <selectTemplateNoModel ref="selectTemplateNoModelRef" @selectTemplateComplete="selectTemplateCompleteNoModel" :fhbsxzt="currentRow.fhbsxzt" /> -->
                            </div>
                            <!-- <div style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px;">
                                <a-button class="blue-btn" type="primary" @click="activeKey = '缺陷报告'" icon="arrow-right" style="margin-right: 15px;">下一步</a-button>
                            </div> -->
                        </div>
                        <div v-show="activeKey == '发现缺陷情况' && DefectReportStateData.state && currentSteps == 2" :key="reportTabKey">
                            <div v-if="defectReportData.id" :key="defectReportKey">
                                <div style="display:flex;justify-content:space-between;align-items:center;">
                                    <div style="flex:1;">
                                        <a-button
                                        style="margin-right: 15px;" 
                                        class="red-btn" type="primary" 
                                        @click="noteDelete(defectReportData,'缺陷')" icon="delete">删除</a-button>
                                        <!-- <a-button
                                        style="margin-right: 15px;" 
                                        class="blue-btn" type="primary" 
                                        @click="refreshFile" icon="reload">刷新</a-button>

                                        <a-button
                                        style="margin-right: 15px;" 
                                        class="blue-btn" type="primary" 
                                        @click="downloadFiles(defectReportData)" icon="download">下载签字</a-button>

                                        <a-button
                                        v-if="defectReportData.fwjlx == '.pdf'"
                                        style="margin-right: 15px;" 
                                        class="blue-btn" type="primary" 
                                        @click="reEdit" icon="form">重新编辑</a-button>

                                        <a-button
                                        v-if="defectReportData.fwjlx !== '.pdf'"
                                        style="margin-right: 15px;" 
                                        class="blue-btn" type="primary" 
                                        @click="saveFiles" icon="folder">保存</a-button>

                                        <a-button
                                        v-if="defectReportData.fwjlx !== '.pdf'"
                                        style="margin-right: 15px;" 
                                        class="blue-btn" type="primary" 
                                        @click="generatePDFClick" icon="file-pdf">生成PDF</a-button>
                                        <a-button 
                                        style="margin-right: 15px;" 
                                        class="blue-btn" type="primary" 
                                        @click="reSelectTemplate" icon="select">重新选择模板</a-button> -->
                                    </div>
                                    <a-button 
                                    class="orange-btn" type="primary" 
                                    id="fxqxqk-cxbjqxx-btn"
                                    @click="completeDefectDescriptionClick('重新编辑')" icon="form">重新编辑缺陷项</a-button>
                                </div>
                                <a-spin tip="正在加载中..." :spinning="defectReportSpinning">
                                    <div :key="iframeKey" style="display: flex;justify-content: center;">
                                        <iframe 
                                            v-if="defectReportDataiframeSrc"
                                            :key="iframeKey"
                                            :src="defectReportDataiframeSrc" 
                                            ref="iframeServerEditingRef" 
                                            scrolling="auto" 
                                            width="100%"
                                            :height="(windowInnerHeight -235 )+'px'"
                                            style="border: 0;"
                                        ></iframe>
                                        <div v-else>
                                            <a-empty description="暂无文件或文件发生错误！"/>
                                        </div>
                                    </div>
                                </a-spin>
                                <!-- {{ defectReportData }} -->
                            </div>
                            <div v-if="!defectReportData.id && activeKey == '发现缺陷情况'">
                                <div style="display:flex;justify-content:space-between;align-items:center;" >
                                    <!-- <span style="color: red;font-weight: 600;">(注：当前暂无缺陷报告文件，请先选择模板进行缺陷报告制作)</span> -->
                                    <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,'现场检查缺陷记录表')">
                                        <a-button
                                        class="blue-btn" 
                                        style="width: 124px;"
                                        type="primary" icon="upload">上传</a-button>
                                    </a-upload>
                                    <a-button 
                                    class="orange-btn" type="primary" 
                                    id="fxqxqk-cxbjqxx-btn"
                                    @click="completeDefectDescriptionClick('重新编辑')" icon="form">重新编辑缺陷项</a-button>
                                </div>
                                <!-- <selectTemplateNoModel ref="selectTemplateNoModel2Ref" @selectTemplateComplete="selectTemplateCompleteNoModel" :fhbsxzt="currentRow.fhbsxzt"/> -->
                            </div>
                            <!-- <div style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px; ">
                                <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="activeKey = '技术审评材料汇总'" icon="arrow-right">下一步</a-button>
                            </div> -->
                        </div>
                        <a-drawer
                            :title="reportName"
                            placement="right"
                            :closable="true"
                            :visible="reportTemplateVisible"
                            @close="reportTemplateVisible = false"
                            width="50%"
                        >
                            <div :key="reportTemplateKey">
                                <a-radio-group name="radioGroup" v-model:value="reportTemplatefmbly" @change="reportTemplateRadioChange" style="margin-bottom: 10px;">
                                    <a-radio value="个人">个人</a-radio>
                                    <a-radio value="审评中心">审评中心</a-radio>
                                    <a-radio value="其他审评员">其他审评员</a-radio>
                                </a-radio-group>
                                <div>
                                    <a-input-search
                                        :key="reportTemplateKey"
                                        placeholder="请输入内容"
                                        enter-button="搜索"
                                        @search="onSearchReportTemplate"
                                    />
                                </div>
                                <div style="height: calc(100vh - 200px);overflow-y: auto;">
                                    <a-list :data-source="reportTemplateList" :loading="reportTemplateLoading">
                                        <a-list-item slot="renderItem" slot-scope="item, index" :key="index">
                                            <div style="width: 300px;" @click="selelctDescribeText(item.fmbnr)">{{ item.fmbnr }}</div>
                                            <span>{{ item.fdycs }}
                                                <span v-if="index !== 0">次</span>
                                            </span>
                                            <div slot="actions" v-if="fmbly == '个人'">
                                                <a-button v-if="index !== 0" size="small" class="red-btn" type="primary" @click="deleteDescribe(item)" icon="delete">删除</a-button>
                                                <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                            </div>
                                        </a-list-item>
                                    </a-list>
                                </div>
                                <a-pagination
                                v-if="totalDescribe"
                                :key="paginationKey"
                                show-size-changer
                                v-model="paginationDescribe.pageNo" 
                                :default-current="paginationDescribe.pageNo"
                                :total="totalDescribe" 
                                :page-size="paginationDescribe.pageSize"
                                @change="paginationChange"
                                @showSizeChange="paginationChange" />
                            </div>
                        </a-drawer>
                        <!-- v-if="activeKey == '会议签到' 首次会议 -->
                        <div v-if="currentSteps == 0 && !currentRow.isTopTabs" class="first-meeting-content-box">
                            <div class="first-meeting-steps-box">
                                <a-button id="schy-hydj-btn1" v-if="firstMeetingRow.fstate == '会议登记'" class="steps-btn blue-btn" type="primary" icon="form" @click="firstMeetingReviseClick(firstMeetingRow)">会议登记</a-button>
                                <div class="jgBox" v-if="firstMeetingRow.fstate == '会议登记'">
                                    <!-- <a-icon  type="arrow-down" /> -->
                                    <img src="../../../../../assets/xx-bz-icon-38.png" alt="">
                                </div>
                                <a-button id="schy-chryqdm-btn2" v-if="firstMeetingRow.fstate == '会议签到'" @click="firstMeetingShareQRCodeClick({fhyzt:firstMeetingRow.fhyzt,id:firstMeetingRow.id,frylx:'企业',fhylx:'首次会议',sqsxid:currentRow.sqsxid})" class="steps-btn blue-btn" type="primary" icon="form">参会人员签到码</a-button>
                                <div class="jgBox" v-if="firstMeetingRow.fstate == '会议签到'">
                                    <img src="../../../../../assets/xx-bz-icon-38.png" alt="">
                                </div>
                                <a-button id="schy-xdxcjc-btn3" @click="recitingDisciplineCahnge('宣读技术审评纪律和廉政纪律')" class="steps-btn orange-btn" type="primary" icon="read">宣读技术审评纪律和廉政纪律</a-button>
                                <div class="jgBox">
                                    <img src="../../../../../assets/xx-bz-icon-38.png" alt="">
                                </div>
                                <!-- {{currentRow.isRwfpFlag?'确认审评范围':'重新确认审评范围'}} -->
                                <a-button id="schy-qrjcfw-btn4" @click="taskAllocationClick()" class="steps-btn blue-btn" type="primary" icon="apartment">确认审评范围</a-button>
                                <div class="jgBox">
                                    <img src="../../../../../assets/xx-bz-icon-38.png" alt="">
                                </div>
                                <a-button id="schy-jsyaqsx-btn5" @click="recitingDisciplineCahnge('介绍审评要求和注意事项')" class="steps-btn green-btn" type="primary" icon="read">介绍审评要求和注意事项</a-button>
                                <div class="jgBox">
                                    <img src="../../../../../assets/xx-bz-icon-38.png" alt="">
                                </div>
                                <a-button id="schy-wcqd-btn6" @click="firstMeetingSuccessSignIn(firstMeetingRow)" v-if="firstMeetingRow.fstate == '会议签到'" class="steps-btn green-l2-btn" type="primary" icon="check-circle">完成签到</a-button>
                                <div class="jgBox" v-if="firstMeetingRow.fstate == '会议签到'">
                                    <img src="../../../../../assets/xx-bz-icon-38.png" alt="">
                                </div>
                                <a-button id="schy-yjqycl-btn7" class="steps-btn blue-btn" type="primary" @click="handoverMaterialsChange()" icon="export" >移交企业材料</a-button>
                            </div>
                            <div class="first-meeting-right-box">
                                <onSiteInspectionCheckInIndex
                                :data="{sqsxid:currentRow.sqsxid,fhylx:'首次会议'}" 
                                ref="onSiteInspectionCheckInIndexRef" 
                                @completeRegistrationChange="completeRegistrationChange('首次会议')" 
                                @fqxqksmChange="fqxqksmChange"
                                />
                                <div v-if="firstMeetingAndAttachmentData.length">
                                    <div class="process-handling-card" :key="firstMeetingDataKey" id="schy-lbtabs-xx-box">
                                        <a-tabs type="card" v-model:activeKey="firstMeetingActiveValue" @change="firstMeetingTabChange">
                                            <a-tab-pane v-for="(item,index) in firstMeetingAndAttachmentData" :key="index" :tab="item.yq"></a-tab-pane>
                                        </a-tabs>
                                    </div>
                                    <div class="content-tabs-item-box">
                                        <div style="width: 100%;">
                                            <commpVxeTable
                                                :key="firstMeetingTableKey"
                                                ref="firstMeetingTableRef"
                                                :isCanWrap="true"
                                                :config="firstMeetingTableConfig" 
                                                :columns="firstMeetingTableColumnsVxe" 
                                                :formItem="[]"
                                                :adaptiveHeight="true"
                                                :tableDataList="firstMeetingTableDataList"
                                            >
                                                <template v-slot:frylx_default="{row}">
                                                    {{ row.frylx }}
                                                    <span v-if="row.fjcsf">（{{row.fjcsf}}）</span>
                                                </template>
                                                <template v-slot:gxnr_default="{row}">
                                                    <span v-if="row.wlysmsz == 'true'">本人保证以上声明全部属实，继续参加本次技术审评工作。如有不实，愿承担因此导致的一切后果。</span>
                                                    <span v-if="row.wlylyct == 'true'">
                                                        <span v-if="row.wlysmsz == 'true'">/</span>
                                                        本人声明与被审评单位有利益冲突关系，主动提出退出本次技术审评工作。
                                                    </span>
                                                    <span v-if="row.wlysfczlygx == 'true'">
                                                        <span v-if="row.wlysfczlygx == 'true'">/</span>
                                                        本人声明与被审评单位有可能存在利益关系，建议提交审查中心审议是否可继续参加本次技术审评工作。
                                                    </span>
                                                </template>
                                                
                                                <template v-slot:fuserid_default="{row}">
                                                    <img v-if="row.fhyqdrq"style="width: 86px;height: 40px;" :src="row.fqmfj" alt="/">
                                                </template>
                                                
                                            </commpVxeTable>
                                        </div>
                                    </div>
                                </div>
                                <div style="display: flex;justify-content: center" v-else>
                                    <a-empty />
                                </div>
                                <!-- <div style="display: flex;justify-content: flex-start;margin-top: 10px;align-items: center">
                                    <a-button
                                    class="blue-btn" 
                                    type="primary" 
                                    style="margin-right: 10px;" 
                                    @click="taskAllocationClick()" icon="apartment"
                                    >{{currentRow.isRwfpFlag?'技术审评任务分配':'重新分配审评任务'}}</a-button>
                                    <a-button
                                        class="blue-btn" 
                                        type="primary" @click="packageDownloadClick()" icon="download"
                                    >下载移交企业的材料</a-button>
                                </div> -->
                            </div>
                            <!-- <div class="nextStep-box">
                                <a-button style="margin: 5px;" class="blue-btn" type="primary" @click="nextStepClick('下一步',1)" >下一步</a-button>
                            </div> -->
                        </div>
                        <!-- 审评笔记 -->
                        <div v-if="currentSteps == 1 && !currentRow.isTopTabs" class="xcjvbj-coontent-v" >
                            <div class="process-handling-card">
                                <a-tabs type="card" v-model:activeKey="personneActiveKey" @change="personneTabChange">
                                    <a-tab-pane v-for="(item,index) in personnelList" :key="index" :tab="item.name"></a-tab-pane>
                                </a-tabs>
                            </div>
                            <div style="border: 1px solid #38f;padding: 8px;border-top: none;">
                                <div class="process-handling-card">
                                    <a-tabs type="card" v-model:activeKey="situationActiveKey" @change="situationTabChange">
                                        <a-tab-pane key="技术审评笔记" tab="技术审评笔记"></a-tab-pane>
                                        <a-tab-pane key="文件审评情况" tab="文件审评情况"></a-tab-pane>
                                    </a-tabs>
                                </div>
                                <div style="border: 1px solid #38f;padding: 8px;border-top: none;">
                                    <div style="width: 100%;display: flex;" v-if="situationActiveKey == '技术审评笔记'">
                                        <div class="check-notes-box" style="min-width: 300px;margin-right: 15px;width: 30%;">
                                            <a-spin tip="正在加载中..." :spinning="checkNotesSpinning" >
                                                <table border bordercolor="#d9d9d9" style="width:100%;">
                                                    <tr>
                                                        <th>
                                                            <div class="left-check-notes-item" @click="selectCheckDirectories({})">
                                                                <span class="text-v" >审评地点/车间</span>
                                                                <div class="check-notes-btn-box" v-if="personneActiveKey == 0">
                                                                    <a-tooltip placement="top">
                                                                        <template slot="title">
                                                                            <span>添加审评地点/车间</span>
                                                                        </template>
                                                                        <a-icon @click="addCheckDirectories({})" style="font-size: 22px;" class="plus-circle-icon" type="plus-circle" />
                                                                    </a-tooltip>
                                                                    
                                                                </div>
                                                            </div>
                                                        </th>
                                                    </tr>
                                                    <tr v-for="(item,index) in finalCheckLeftList" :key="index">
                                                        <td :class="finalCheckLeftSelectData.id == item.id?'select-left-check-item':''">
                                                            <div class="left-check-notes-item" @click="selectCheckDirectories({...item,index})">
                                                                <span class="text-v" >{{ item.fddcj }}</span>
                                                                <div class="check-notes-btn-box" v-if="personneActiveKey == 0">
                                                                    <a-tooltip placement="top">
                                                                        <template slot="title">
                                                                            <span>添加审评记录</span>
                                                                        </template>
                                                                        <a-icon @click="addCheckNotesClick({fmlid:item.id})" class="plus-circle-icon" type="plus-circle" />
                                                                    </a-tooltip>
                                                                    <a-tooltip placement="top">
                                                                        <template slot="title">
                                                                            <span>编辑审评地点/车间</span>
                                                                        </template>
                                                                        <a-icon @click="addCheckDirectories({...item,index})" class="edit-icon" type="edit" />
                                                                    </a-tooltip>
                                                                    <a-tooltip placement="top">
                                                                        <template slot="title">
                                                                            <span>删除审评地点/车间</span>
                                                                        </template>
                                                                        <a-icon  @click="deleteCheckDirectories({...item,index})" class="delete-icon" type="delete" />
                                                                    </a-tooltip>
                                                                </div>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr v-if="!finalCheckLeftList.length" >
                                                        <td style="height: calc(100vh - 292px);" colspan="5">
                                                            <a-empty description="暂无数据！"/>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </a-spin>
                                        </div>
                                        <div style="flex: 1;">
                                            <!-- <div class="check-notes-top-btn" >
                                                <a-button id="jcjl-xzjcji-btn" class="blue-btn" type="primary" icon="plus" @click="addCheckNotesClick({})" >新增审评记录</a-button>
                                            </div> -->
                                            <a-spin tip="正在加载中..." :spinning="checkNotesRightSpinning" >
                                                <div class="check-notes-box">
                                                    <table border bordercolor="#d9d9d9" style="width:100%;">
                                                        <tr>
                                                            <!-- <th ><span>地&emsp;&emsp;点</span></th> -->
                                                            <th>
                                                                <div style="display: flex;justify-content: center;" >
                                                                    <span style="display: flex;width: 56px;justify-content: space-between;" >
                                                                        <span>功</span>
                                                                        <span>能</span>
                                                                        <span>间</span>
                                                                    </span>
                                                                </div>
                                                                
                                                            </th>
                                                            <th>描&emsp;&emsp;述</th>
                                                            <th>附&emsp;&emsp;件</th>
                                                            <th style="width: 245px;" v-if="personneActiveKey == 0">操&emsp;&emsp;作</th>
                                                        </tr>
                                                        <tr v-for="(item,index) in finalCheckNotesList" :key="index" :style="{background:(index+1) % 2 == 0?'#f0f0f1':'#fff'}" >
                                                            <!-- <td>{{ item.dd.fddmc }}</td> -->
                                                            <td>{{ item.dd.fjtk }}</td>
                                                            <td>
                                                                <div>
                                                                    <a-textarea 
                                                                        readonly
                                                                        v-if="item.dd.fmsnr"
                                                                        v-model="item.dd.fmsnr"
                                                                        :autoSize="{ minRows: 1, maxRows: 15 }"
                                                                    ></a-textarea>
                                                                </div>
                                                                
                                                                <!-- <vxe-textarea v-if="item.dd.fmsnr" style="margin-top: 5px;"v-model="item.dd.fmsnr" readonly :autosize="{ minRows: 1,}"></vxe-textarea> -->
                                                                <!-- <div v-html="item.dd.fmsnr" ></div> -->
                                                            </td>
                                                            <td :style="{minWidth:item.wjList.length?(item.wjList.length>4?'468px':item.wjList.length <= 4?'228px':'100px'):'100px'}" >
                                                                <div class="checkNotes-fileList-box" >
                                                                    <div v-for="(trem,tIndex) in item.wjList" :key="tIndex">
                                                                        <div class="checkNotes-file-item an-upload-list-item" >
                                                                            <div class="an-upload-list-item-info" >
                                                                                <!-- onerror="showFallback(this)" 
                                                                                    function showFallback(img) {
                                                                                        var fallback = document.getElementById('fallback');
                                                                                        fallback.textContent = img.alt; // 设置后备元素的文本为图片的 alt 文本
                                                                                        fallback.style.display = 'block'; // 显示后备元素
                                                                                    }
                                                                                -->
                                                                                <img style="height:100%;width:auto;max-width: 100%;object-fit: contain;" :src="trem.base64Url" />
                                                                            </div>
                                                                            <div class="an-upload-list-item-actions">
                                                                                <a-icon class="icon-v-nf" type="eye" @click="eyeCheckFile(trem)"/>
                                                                                <a-icon type="delete" @click="deleteCheckFile(trem,tIndex,item.wjList,item,index)" />
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </td>
                                                            <td style="text-align: left;" v-if="personneActiveKey == 0">
                                                                <a-button v-if="item.wjList.length" style="margin-right: 10px;"  class="blue-btn" type="primary" @click="eyeCheckFile(item,item.wjList)" icon="eye">预览</a-button>
                                                                <a-button style="margin-right: 10px;"  class="blue-btn" type="primary" @click="addCheckNotesClick(item.dd)" icon="edit">编辑</a-button>
                                                                <a-button class="red-btn" type="primary" @click="finalCheckDeleteClick(item)" icon="delete">删除</a-button>
                                                            </td>
                                                        </tr>
                                                        <tr v-if="!finalCheckNotesList.length" >
                                                            <td style="height: calc(100vh - 292px);" colspan="5">
                                                                <a-empty description="暂无数据！"/>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </a-spin>
                                        </div>
                                    </div>
                                    <div v-if="situationActiveKey == '文件审评情况'">
                                        <div class="check-notes-top-btn" v-if="personneActiveKey == 0">
                                            <a-button id="jcjl-xzjcji-btn" class="blue-btn" type="primary" icon="plus" @click="addFileSituationClick({})" >新增文件审评情况</a-button>
                                        </div>
                                        <a-spin tip="正在加载中..." :spinning="checkNotesRightSpinning" >
                                            <div class="check-notes-box" style="height: calc(100vh - 275px);" >
                                                <table border bordercolor="#d9d9d9" style="width:100%;">
                                                    <tr>
                                                        <th>文件类型</th>
                                                        <th>
                                                            <div style="display: flex;justify-content: center;" >
                                                                <span style="display: flex;width: 56px;justify-content: space-between;" >
                                                                    <span>文</span>
                                                                    <span>件</span>
                                                                    <span>名</span>
                                                                </span>
                                                            </div>
                                                        </th>
                                                        <th>文件编号</th>
                                                        <th>企业执行情况</th>
                                                        <th v-if="personneActiveKey == 0">操&emsp;&emsp;作</th>
                                                    </tr>
                                                    <tr v-for="(item,index) in fileSituationList" :key="index" >
                                                        <td>{{ item.fwjfl }}</td>
                                                        <td>{{ item.fwjm }}</td>
                                                        <td>{{ item.fwjbh }}</td>
                                                        <td>{{ item.fqyzxqk }}</td>
                                                        <td style="text-align: left;width: 180px;" v-if="personneActiveKey == 0">
                                                            <a-button style="margin-right: 10px;"  class="blue-btn" type="primary" @click="addFileSituationClick(item)" icon="edit">编辑</a-button>
                                                            <a-button class="red-btn" type="primary" @click="FileSituationDeleteClick(item)" icon="delete">删除</a-button>
                                                        </td>
                                                    </tr>
                                                    <tr v-if="!fileSituationList.length" >
                                                        <td style="height: calc(100vh - 315px);" colspan="5">
                                                            <a-empty description="暂无数据！"/>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </a-spin>
                                    </div>
                                </div>
                            </div>
                            
                        </div>
                        <!-- 末次会议 -->
                        <div v-show="(currentSteps == 3 && !currentRow.isTopTabs) || activeKey == '技术审评材料汇总'">
                            <!-- <div style="display: flex;justify-content: flex-end;" v-if="!currentRow.isTopTabs">
                                <a-button
                                class="blue-btn" 
                                type="primary" @click="satisfactionClick">满意度调查二维码</a-button>
                            </div> -->
                            <div style="width: 96%;margin-left: 2%;" >
                                <div
                                    v-if="!currentRow.isTopTabs"
                                    style="
                                        display:flex;
                                        justify-content:space-between;
                                        padding:10px;
                                        background:#dbe6f2;
                                        align-items:center;
                                        border:1px solid #e4e3e3;
                                        border-bottom:0;
                                    "
                                    :style="{marginTop:currentSteps == 5?'10px':'0'}"
                                >
                                    <span style="font-size:16px;font-weight:600;">末次会议</span>
                                    <div style="color:#2F54EB;">
                                        <span v-if="lastMeetingDisplay" style="display:flex;align-items:center;" @click="lastMeetingDisplay = false;">
                                            <span style="padding-right:3px">折叠</span>
                                            <a-icon type="down" />
                                        </span>
                                        <span v-if="!lastMeetingDisplay" style="display:flex;align-items:center;" @click="lastMeetingDisplay = true">
                                            <span style="padding-right:3px">展开</span>
                                            <a-icon type="up" />
                                        </span>
                                    </div>
                                </div>
                                <div v-show="lastMeetingDisplay" style="display: flex;border: 1px solid #e4e3e3;padding: 10px;" v-if="!currentRow.isTopTabs">
                                    <div style="flex: 1;" >
                                        <onSiteInspectionCheckInIndex
                                        :data="{sqsxid:currentRow.sqsxid,fhylx:'末次会议'}" 
                                        :key="onSiteInspectionCheckInMociKey"  
                                        ref="onSiteInspectionCheckInMociRef" 
                                        @completeRegistrationChange="completeRegistrationChange('末次会议')"
                                        @fqxqksmChange="fqxqksmChange"
                                        />
                                    </div>
                                </div>
                                <div style="margin-bottom: 10px;" ></div>
                                <div style="display: flex;" >
                                    <div id="mchy-qbcl-box" style="width: 100%;" :style="{height: currentRow.leftMlHeigth?
                                        'calc(100vh - '+(currentRow.leftMlHeigth+56)+'px)':
                                        (lastMeetingDisplay?'calc(100vh - 341px)':'calc(100vh - 278px)'),overflowY: 'auto',border:currentRow.isTopTabs?'none':'none'}">
                                        <table border bordercolor="#d9d9d9" style="width:100%; " >
                                            <tr style="background: #dee5ed !important;">
                                                <th style="color: #000;width: 250px;" >技术审评结束交回中心材料目录</th>
                                                <th style="color: #000;width: 280px;" >情况说明</th>
                                                <th style="color: #000;" >文件</th>
                                                <th style="color: #000;width: 210px;" >操作</th>
                                            </tr>
                                            <!-- v-if="item.clmc == '缺席人员说明'" -->
                                            <tr v-for="(item,index) in materialSummaryList" :key="index" v-if="item.clmc !== '缺席人员说明' || (item.clmc == '缺席人员说明' && absenceSituationState)" :style="{background:(index+1) % 2 == 0?'#f0f0f1':'#fff'}">
                                                <td>
                                                    <span :style="{color:item.wjList && item.wjList.length?'#000':'#ed5565'}" style="font-size: 14px;font-weight: 600;">{{ item.clmc }}</span>
                                                    <span v-if="item.wjList && item.wjList.length" style="color: #1ab348;">（{{item.wjList.length}}份）</span>
                                                </td>
                                                <td style="color: #faad14;">
                                                    <span v-if="item.clmc == '技术审评报告'"></span>
                                                    <span v-if="item.clmc == '技术审评缺陷记录表'">如有，需要下载企业盖章</span>
                                                    <span v-if="item.clmc == '技术审评纪律'"></span>
                                                    <span v-if="item.clmc == '无利益冲突声明'"></span>
                                                    <span v-if="item.clmc == '技术审评会议签到表'"></span>
                                                    <span v-if="item.clmc == '技术审评审评员承诺书'"></span>
                                                    <span v-if="item.clmc == '技术审评报告附件'">如有，需上传文件</span>
                                                    <span v-if="item.clmc == '技术审评记录'"></span>
                                                    <span v-if="item.clmc == '其他说明材料'">如有，需上传文件</span>
                                                    <span v-if="item.clmc == '客户满意度调查表'"></span>
                                                    <span v-if="item.clmc == '食品药品风险信息报送说明'">如有，需要下载企业盖章</span>
                                                    <!-- <span v-if="item.clmc == '促进产业高质量发展调查表'">如有，需要下载企业盖章</span> -->
                                                    <!-- <span v-if="item.clmc == '缺席人员说明'">如果有缺席人员，需上传文件说明(模板放在首次会议移送企业里面)</span> -->
                                                </td>
                                                <td style="text-align: center;">
                                                    <div class="file-for-box "  style="display: flex;flex-direction: column;">
                                                        <div v-for="(trem,tIndex) in item.wjList" :key="tIndex"
                                                            style="display: flex;align-items: center;flex-direction: row;height: auto;justify-content: flex-start"
                                                            :class="currentLastMeetingData.id == trem.id?'select-last-meeting-box':''"
                                                        >
                                                            <div class="toolbox-fileList-box" >
                                                                <div class="toolbox-file-coontern" style="margin-right: 5px;">
                                                                <span class="toolbox-file-name" style="-webkit-line-clamp: 1;" @click.top.prevent="viewFinalFileClick(trem)"><a href="#">{{ trem.fwjxsmc+trem.fwjlx }}</a></span>
                                                                </div>
                                                                <div class="fileList-icon-btn" style="flex: none;">
                                                                    <a-icon type="download" class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;font-size:16px;" @click.top.prevent="downloadFiles(trem)"/>
                                                                    <a-icon type="eye" class="toolbox-eye-icon-type" style="padding: 0;margin: 0;margin-right: 5px;" @click.top.prevent="viewFinalFileClick(trem)"/>
                                                                    <a-icon type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin-right: 5px;" @click.top.prevent="producerDelete({...item,...trem,index,tIndex})"/>
                                                                </div>
                                                            </div>
                                                            
                                                        </div>
                                                    </div>
                                                </td>
                                                <td >
                                                    <a-upload v-if="item.clmc == '技术审评报告' || item.clmc == '技术审评报告附件'||item.clmc == '技术审评缺陷记录表'||item.clmc == '技术审评纪律'||item.clmc == '其他说明材料'||item.clmc == '缺席人员说明'||item.clmc == '食品药品风险信息报送说明'||item.clmc == '促进产业高质量发展调查表'"
                                                    style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,item.clmc)">
                                                        <a-button
                                                        class="blue-btn" 
                                                        type="primary" icon="upload">上传</a-button>
                                                    </a-upload>
                                                    <!-- <a-button
                                                        v-if="(item.clmc == '食品药品风险信息报送说明' || item.clmc == '促进产业高质量发展调查表') && !currentRow.materialOperation"
                                                        class="green-l2-btn" 
                                                        style="margin-left: 10px;"
                                                        type="primary" @click="selectFileCahnge(item.clmc)" icon="download"
                                                    >下载模板</a-button> -->
                                                    <a-button
                                                        v-if="item.clmc == '技术审评记录' && !currentRow.materialOperation"
                                                        class="green-l2-btn" 
                                                        type="primary" @click="scwjFileCahnge(item.clmc)" icon="check-circle"
                                                    >生成文件</a-button>
                                                    <!-- <a-button
                                                        v-if="item.clmc == '技术审评报告' && currentRow.fhjmc == '综合评定'"
                                                        class="green-l2-btn" 
                                                        style="margin-left: 10px;"
                                                        type="primary" @click="bgSignCahnge(item.clmc)" icon="highlight"
                                                    >签字</a-button> -->
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- 报销 -->
                        <div v-if="currentSteps == 4">
                            <div >
                                <reimbursement ref="reimbursementRef" :rowData="{sqsxid:currentRow.sqsxid,view:false,heightType:'isReviewVer'}" />
                            </div>
                        </div>

                        <!-- <div v-show="activeKey == '审评方案拟定'" >
                            <planProductionProduction ref='planProductionProductionRef' :key="planProductionProductionKey"/>
                        </div> -->
                        <!-- activeKey == '技术审评材料汇总' -->
                        <div v-show="false">
                            <div style="text-align: right;padding: 5px;">
                            </div>
                            <table border bordercolor="#d9d9d9" style="width: 100%; ">
                                <tr>
                                    <th style="width: 160px;">材料目录</th>
                                    <th>文件</th>
                                    <th style="width: 220px;">
                                        操作
                                        
                                    </th>
                                </tr>
                                <tr v-for="(item,index) in materialSummaryList" :key="index">
                                    <td style="text-align: center;">
                                        <div style="display: flex;align-items: center;">
                                            <span style="color: #ed5565;font-size: 20px;"
                                            v-if="item.clmc == '无利益冲突声明' || item.clmc == '技术审评纪律' || item.clmc == '技术审评会议签到表' || item.clmc == '技术审评审评员承诺书'"
                                            >*</span>
                                            <span>{{ item.clmc }}</span>
                                        </div>
                                    </td>
                                    <td>
                                        <div class="file-for-box">
                                            <div style="display: flex;flex-wrap: wrap;">
                                                <div v-for="(trem,tIndex) in item.wjList" class="toolbox-fileList-box" :key="tIndex"
                                                style="display: flex;align-items: center;flex-direction: row;height: auto;">
                                                    
                                                    <div class="toolbox-file-coontern" style="margin-right: 5px;flex: 1;">
                                                        <a-tooltip placement="rightBottom">
                                                            <template slot="title">
                                                            <span>{{ trem.fwjxsmc+trem.fwjlx }}</span>
                                                            </template>
                                                            <span class="toolbox-file-name" style="-webkit-line-clamp: 1;"><a href="#">{{ trem.fwjxsmc+trem.fwjlx }}</a></span>
                                                        </a-tooltip>
                                                        
                                                    </div>
                                                    <div class="fileList-icon-btn" style="flex: none;">
                                                        <a-icon type="download" class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;font-size:16px;" @click="downloadFiles(trem)"/>
                                                        <a-icon type="eye" class="toolbox-eye-icon-type" style="padding: 0;margin: 0;margin-right: 5px;" @click="viewClick(trem)" v-if="trem.type == '.pdf'"/>
                                                        <a-icon type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin-right: 5px;" @click="producerDelete(trem)"/>
                                                    </div>
                                                </div>
                                            </div>
                                            <!-- <div class="file-for-v" v-for="(trem,tIndex) in item.wjList" :key="tIndex">
                                                <div class="file-icon-box">
                                                    <div class="right-box">
                                                        //<a-icon class="fileicon-v" type="form" @click="editClick(trem)" />
                                                        <a-icon class="fileicon-v deleteicon-v" type="delete" @click="producerDelete(trem)"/>
                                                    </div>
                                                    <a-icon class="file-icon-v" type="file-pdf" />
                                                    <div class="right-box">
                                                        //<a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="producerUpload($event,trem)">
                                                            <a-icon class="fileicon-v" type="upload" />
                                                        </a-upload>
                                                        //
                                                        <a-icon class="fileicon-v" type="eye" @click="viewClick(trem)" v-if="trem.fwjlx == '.pdf'" />
                                                        <a-icon class="fileicon-v" type="download" @click="downloadFiles(trem)"/>
                                                    </div>
                                                </div>
                                                <a @click="downloadFiles(trem)" class="name-fclmc-text">{{ trem.fwjxsmc+trem.fwjlx }}</a>
                                            </div> -->
                                        </div>
                                    </td>
                                    <td v-if="item.clmc !== '客户满意度调查表'">
                                        <!-- <a-button
                                        class="blue-btn" 
                                        style="margin:3px 0;margin-right: 5px;"
                                        type="primary" @click="initWjjlServe(item.clmc)">生成记录</a-button> -->

                                        <!-- <a-button
                                        class="green-l2-btn" 
                                        style="margin:3px 0;margin-right: 5px;width: 124px;"
                                        type="primary" @click="selectFileCahnge(item.clmc)" icon="download">下载模板</a-button> -->

                                        <!-- <a-button
                                        style="margin:3px 0;margin-right: 5px;"
                                        class="blue-btn" 
                                        type="primary" @click="batchUploadCahnge(item.clmc)">批量上传</a-button> -->
                                        <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,item.clmc)">
                                            <a-button
                                            class="blue-btn" 
                                            style="width: 124px;"
                                            type="primary" icon="upload">上传</a-button>
                                        </a-upload>

                                        <!-- <a-button
                                        style="margin:3px 0;margin-right: 5px;"
                                        class="blue-btn" 
                                        type="primary" @click="downloadTemplateCahnge(item.clmc)">下载模板</a-button> -->
                                        
                                    </td>
                                    <td v-else>

                                    </td>
                                </tr>
                            </table>
                            <div style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px;" v-if="!currentRow.isTopTabs">
                                <a-button class="blue-btn" type="primary" @click="submitOnSite('spcysubmitFlow')" >提交技术审评并发起整改</a-button>
                            </div>
                        </div>
                        <div v-if="activeKey == '材料审查'">
                            <materialReviewExamination ref="materialReviewExaminationRef" :key="materialReviewExaminationKey" />
                        </div>
                        <div v-if="activeKey == '申请信息'  || activeKey == '环节流转记录'" style="height: 100%;overflow: hidden;">
                            <a-spin size="large" :spinning="modalSpinningPrice" tip="正在加载中...">
                                <eventSet :key="eventSetKey" ref="eventSetRef" @updatedSuccess="eventupdatedSuccess"/>
                            </a-spin>
                        </div>
                    </div>
                </div>
                <div class="sceneInspect-right-zlckBox" v-if="currentSteps == 2 && dataViewingStatus">
                    <div class="left-bgBox-top" style="display: flex;align-items: center;padding-right: 15px;border-bottom: 1px solid #38f;" @click="dataViewingStatus = !dataViewingStatus">
                        <div>
                            <a-icon type="double-left" />
                            <vxe-pulldown ref="pulldownRef" destroy-on-close v-if="dataViewingStatus">
                                <template #default>
                                    <!-- <vxe-button status="primary" icon="vxe-icon-arrow-down" @click="clickEvent3">资料目录</vxe-button> -->
                                    <a-button id="jcbg-zlml-btn" style="margin-left: 8px;" class="green-btn" type="primary" @click.stop="clickEvent3" icon="down">资料目录</a-button>
                                    <a-button id="jcbg-jcjl-btn" style="margin-left: 8px;" class="green-l-btn" type="primary" @click.stop="viewInspectionRecordsClick" icon="read">审评记录</a-button>
                                    <a-button id="jcbg-cyfg-btn" class="orange-btn" style="margin-left: 8px;" @click.stop="searchBasisClick()" icon="profile" type="primary">查阅法规</a-button>
                                </template>
                                <template #dropdown>
                                    <div class="my-dropdown3 xcjvbj-coontent-v"  >
                                        <div style="width:300px;overflow-y: auto;height: 300px;border: 1px solid #d9d9d9;" :style="{height:(windowInnerHeight - 220)+'px'}">
                                            <table border bordercolor="#d9d9d9" style="width: 100%; ">
                                                <!-- <tr>
                                                    <th style="background:#5ca3e5;color:#fff;padding:5px;">
                                                        <div style="display: flex;justify-content: space-between;align-items: center;">
                                                            <span style="font-size: 16px;">{{ xcjcNoteData.clmc }} </span>
                                                        </div>
                                                    </th>
                                                </tr>
                                                <tr v-if="xcjcNoteData.wjList" v-for="(item,index) in xcjcNoteData.wjList" :key="index">
                                                    <td
                                                    @click.stop="selectmlNoteItem({...item,index:index})" 
                                                    :class="item.id == currentXcjcMLNoteState.id?'select-XcjcNote-box':''" 
                                                    class="XcjcNote-item-box" 
                                                    style='color:#999;'
                                                    >
                                                        <span >{{ item.fwjxsmc+item.fwjlx }}</span>
                                                    </td>
                                                </tr> -->
                                                <tr v-for="(item,index) in noticeMaterialDataList" :key="index">
                                                    <td
                                                        v-if="item.fwjxsmc || item.fclmc"
                                                        @click.stop="selectmlNoteItem({...item,index:index})" 
                                                        :class="item.id == currentXcjcMLNoteState.id?'select-XcjcNote-box':''" 
                                                        class="XcjcNote-item-box" 
                                                        style='color:#999;'
                                                    >
                                                        <span >{{ item.fwjxsmc?(item.fwjxsmc+item.fwjlx):item.fclmc }}</span>
                                                    </td>
                                                    <th v-else style="background:#5ca3e5;color:#fff;padding:5px;">
                                                        <div style="display: flex;justify-content: space-between;align-items: center;">
                                                            <span style="font-size: 16px;">{{ item.name =='企业申报材料'? '审评参考材料': item.name =='审评报告模板'?'任务报告模板':item.name}}</span>
                                                        </div>
                                                    </th>
                                                    
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                </template>
                            </vxe-pulldown>
                        </div>
                        <span class="title" style="text-align:right;">资料查看</span>
                    </div>
                    <div v-if="isViewCheckNotes">
                        <div class="process-handling-card">
                            <a-tabs type="card" v-model:activeKey="personneActiveKey" @change="personneTabChange">
                                <a-tab-pane v-for="(item,index) in personnelList" :key="index" :tab="item.name"></a-tab-pane>
                            </a-tabs>
                        </div>
                        <div style="border: 1px solid #38f;padding: 8px;border-top: none;">
                            <div class="process-handling-card">
                                <a-tabs type="card" v-model:activeKey="situationActiveKey" @change="situationTabChange">
                                    <a-tab-pane key="技术审评笔记" tab="技术审评笔记"></a-tab-pane>
                                    <a-tab-pane key="文件审评情况" tab="文件审评情况"></a-tab-pane>
                                    <!-- checkNotesRightSpinning -->
                                </a-tabs>
                            </div>
                            <div style="border: 1px solid #38f;padding: 8px;border-top: none;">
                                <div  style="height: calc(100vh - 266px);overflow-y: auto;">
                                    <div v-if="situationActiveKey == '技术审评笔记'">
                                        <a-spin tip="正在加载中..." :spinning="checkNotesRightSpinning">
                                            <div v-if="finalCheckNotesList.length">
                                                <div v-for="(item,index) in finalCheckNotesList" :key="index" class="checkNotes-fileList-item-v">
                                                    <div class="fddmc-text-box">
                                                        {{ item.dd.fddmc }}
                                                        <!-- {{ item.dd.fjtk }} -->
                                                    </div>
                                                    <div class="fjtk-text-box">
                                                        {{ item.dd.fjtk }}
                                                        <!-- {{ item.dd.fjtk }} -->
                                                    </div>
                                                    <div style="position: absolute;z-index: -5;opacity: 0;" :id="'reportViewFmsnr'+index" v-html="item.dd.fmsnr" ></div>
                                                    <div v-if="item.viewAll">
                                                        <div v-html="item.dd.fmsnr" ></div>
                                                    </div>
                                                    <div v-else class="report-view-fmsnr-v" >
                                                        <div v-html="item.dd.fmsnr" ></div>
                                                    </div>
                                                    <div v-if="item.textlength" style="color: #38f;font-size: 16px" >
                                                        <span v-if="item.viewAll" @click="fmsnrViewAllClick(item,index)" >收起</span>
                                                        <span v-else @click="fmsnrViewAllClick(item,index)">全文</span>
                                                    </div>
                                                    <div class="view-checkNotes-box-v" >
                                                        <div class="checkNotes-fileList-box" >
                                                            <div v-for="(trem,tIndex) in item.wjList" :key="tIndex"  >
                                                                <div class="checkNotes-file-item an-upload-list-item" >
                                                                    <div class="an-upload-list-item-info" >
                                                                        <!-- onerror="showFallback(this)" 
                                                                            function showFallback(img) {
                                                                                var fallback = document.getElementById('fallback');
                                                                                fallback.textContent = img.alt; // 设置后备元素的文本为图片的 alt 文本
                                                                                fallback.style.display = 'block'; // 显示后备元素
                                                                            }
                                                                        -->
                                                                        <img style="height:100%;width:auto;max-width: 100%;object-fit: contain;" :src="trem.base64Url" />
                                                                    </div>
                                                                    <div class="an-upload-list-item-actions">
                                                                        <a-icon class="icon-v-nf" type="eye" @click="eyeCheckFile(trem)"/>
                                                                        <!-- <a-icon type="delete" @click="deleteCheckFile(trem,tIndex,item.wjList,item,index)" /> -->
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    
                                                </div>
                                            </div>
                                            <div v-else>
                                                <a-empty description="暂无数据！"/>
                                            </div>
                                        </a-spin>
                                    </div>
                                    <div v-if="situationActiveKey == '文件审评情况'">
                                        <a-spin tip="正在加载中..." :spinning="checkNotesRightSpinning">
                                            <div v-if="fileSituationList.length">
                                                <div v-for="(item,index) in fileSituationList" :key="index" class="checkNotes-fileList-item-v">
                                                    <div style="background-color: #1ab348;color: #fff;padding: 3px 5px;border-radius: 4px;display: inline-block;">
                                                        <span >文件类型：</span>
                                                        <span>{{ item.fwjfl }}</span>
                                                    </div>
                                                    <div class="fddmc-text-box">
                                                        {{ item.fwjm }}
                                                        <!-- {{ item.dd.fjtk }} -->
                                                    </div>
                                                    <div class="fjtk-text-box">
                                                        {{ item.fwjbh }}
                                                        <!-- {{ item.dd.fjtk }} -->
                                                    </div>
                                                    <div style="position: absolute;z-index: -5;opacity: 0;" :id="'fileSituationFqyzxqk'+index" v-html="item.fqyzxqk" ></div>
                                                    <div v-if="item.viewAll">
                                                        <div v-html="item.fqyzxqk" ></div>
                                                    </div>
                                                    <div v-else class="report-view-fmsnr-v" >
                                                        <div v-html="item.fqyzxqk" ></div>
                                                    </div>
                                                    <div v-if="item.textlength" style="color: #38f;font-size: 16px" >
                                                        <span v-if="item.viewAll" @click="fmsnrViewAllClick(item,index,true)" >收起</span>
                                                        <span v-else @click="fmsnrViewAllClick(item,index,true)">全文</span>
                                                    </div>
                                                    <div class="view-checkNotes-box-v" >
                                                        <div class="checkNotes-fileList-box" >
                                                            <div v-for="(trem,tIndex) in item.wjList" :key="tIndex"  >
                                                                <div class="checkNotes-file-item an-upload-list-item" >
                                                                    <div class="an-upload-list-item-info" >
                                                                        <!-- onerror="showFallback(this)" 
                                                                            function showFallback(img) {
                                                                                var fallback = document.getElementById('fallback');
                                                                                fallback.textContent = img.alt; // 设置后备元素的文本为图片的 alt 文本
                                                                                fallback.style.display = 'block'; // 显示后备元素
                                                                            }
                                                                        -->
                                                                        <img style="height:100%;width:auto;max-width: 100%;object-fit: contain;" :src="trem.base64Url" />
                                                                    </div>
                                                                    <div class="an-upload-list-item-actions">
                                                                        <a-icon class="icon-v-nf" type="eye" @click="eyeCheckFile(trem)"/>
                                                                        <!-- <a-icon type="delete" @click="deleteCheckFile(trem,tIndex,item.wjList,item,index)" /> -->
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    
                                                </div>
                                            </div>
                                            <div v-else>
                                                <a-empty description="暂无数据！"/>
                                            </div>
                                        </a-spin>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                    </div>
                    <div v-else >
                        <a-spin tip="正在加载中..." :spinning="zlmlSpinning">
                            <iframe :key="iframeWJkey" :src="zlmlIframeSrc" width="100%" :height="(windowInnerHeight - 173)+'px'"  v-if="zlmlIframeSrc"></iframe>
                            <div v-else>
                                <a-empty description="暂无文件或文件发生错误！"/>
                            </div>
                        </a-spin>
                    </div>
                </div>
            </div>
        </a-spin>
        <a-drawer
            title="描述模板"
            placement="right"
            :closable="true"
            :visible="drawerVisible"
            @close="drawerVisible = false"
            width="50%"
        >
            <div :key="drawerKey">
                <a-radio-group name="radioGroup" v-model:value="fmbly" @change="fmblyChange" style="margin-bottom: 10px;">
                    <a-radio value="个人">个人</a-radio>
                    <a-radio value="审评中心">审评中心</a-radio>
                    <a-radio value="其他审评员">其他审评员</a-radio>
                </a-radio-group>
                <div>
                    <a-input-search
                        :key="inputSearchKey"
                        placeholder="请输入内容"
                        enter-button="搜索"
                        @search="onSearchDescribe"
                    />
                </div>
                <div style="height: calc(100vh - 200px);overflow-y: auto;">
                    <a-list :data-source="describeList" :loading="describeLoading">
                        <a-list-item slot="renderItem" slot-scope="item, index" :key="index">
                            <div style="width: 300px;" @click="selelctDescribeText(item.fmbnr)">{{ item.fmbnr }}</div>
                            <span>{{ item.fdycs }}
                                <span v-if="index !== 0">次</span>
                            </span>
                            <div slot="actions" v-if="fmbly == '个人'">
                                <a-button v-if="index !== 0" size="small" class="red-btn" type="primary" @click="deleteDescribe(item)" icon="delete">删除</a-button>
                                <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                            </div>
                        </a-list-item>
                    </a-list>
                </div>
                <a-pagination
                v-if="totalDescribe"
                :key="paginationKey"
                show-size-changer
                v-model="paginationDescribe.pageNo" 
                :default-current="paginationDescribe.pageNo"
                :total="totalDescribe" 
                :page-size="paginationDescribe.pageSize"
                @change="paginationChange"
                @showSizeChange="paginationChange" />
            </div>
        </a-drawer>
        <!-- 审评方案拟定 -->
        <!-- v-if="currentSteps == 1 || currentSteps == 2 || currentSteps == 3" -->
        
        <a-modal
            v-model:visible="planMaterialsvisible"
            title="审评方案材料"
            @ok="planMaterialsvisible = false"
            width="100%"
            wrapClassName="plan-materials-full-modal"
            :footer=null
        >
            <planProductionProduction ref='planProductionProductionRef' :key="planProductionProductionKey"/>
        </a-modal>
        <a-modal v-model="changeFileNamevisible" title="修改记录文件名称" @ok="changeFileNameHandleOk">
            <a-textarea 
                placeholder="请输入记录文件名称"
                v-model:value="changeFileNameVal"
                :autosize="{ minRows: 1, maxRows: 3 }"
            ></a-textarea>
        </a-modal>
        <selectTemplateDownload ref="selectTemplateDownloadRef" />
        <selectTemplate ref="selectTemplateRef" @selectTemplateComplete="selectTemplateCompleteNoModel"/>
        <serverEditingView ref="serverEditingViewRef" @refreshChange="$event=>{}"/>
        <serverEditing ref="serverEditingRef" @refreshChange="refreshChange"/>
        <QRQueryResults ref="QRQueryResultsRef"/>
        <chooseTerms ref="chooseTermsRef" @chooseTermsSuccess="chooseTermsSuccess" />
        <recitingDiscipline ref="recitingDisciplineRef" />
        <addProblem ref="addProblemRef" @addProblemChange="addProblemChange"/>
        <enterpriseDownload ref="enterpriseDownloadRef" />
        <extractTemplate ref="extractTemplateRef" />
        <huHandleModal ref="huHandleModalRef" @success="huHandleSuccess"></huHandleModal><!-- 日常考评/日常考评互评 -->
        <handleModal ref="handleModalRef" @success="huHandleSuccess"></handleModal><!-- 日常考评/其他环节 -->
        <!-- 见习考评、、暂时先用、还未改版 -->
        <prepareinspectormIncrease ref="prepareinspectormIncreaseRef" @handlerSave="huHandleSuccess" />
        <viewFinalFile ref="viewFinalFileRef" />
        <addCheckNotes ref="addCheckNotesRef" @addCheckNotesSuccess="addCheckNotesSuccess"/>
        <addCheckDirectories ref="addCheckDirectoriesRef" @addCheckDirectoriessuccess="addCheckDirectoriessuccess"/>
        <addFileSituation ref="addFileSituationRef" @addFileSituationsuccess="addFileSituationsuccess"/>
        <previewRecordFile ref="previewRecordFileRef" />
    </div>
</template>
<script>
import addFileSituation from './addFileSituation.vue'
import reimbursement from '../../../reimbursement/index.vue'
import previewRecordFile from './previewRecordFile.vue'
import addCheckNotes from './addCheckNotes.vue'
import addCheckDirectories from './addCheckDirectories.vue'
import viewFinalFile from './viewFinalFile.vue'
import prepareinspectormIncrease from '../../../../everydayCheck/prepareinspectorm/increase.vue'
import huHandleModal from '../../../../dailyEvaluation/huHandleModal.vue'
import handleModal from '../../../../dailyEvaluation/handleModal.vue'
import chooseTerms from './chooseTerms.vue'
import selectTemplateDownload from '@/components/selectTemplate/selectTemplate-download.vue'
import serverEditing from '@/components/comp-model-series/server-editing.vue'
import serverEditingView from '@/components/comp-model-series/server-editing-view'
import selectTemplate from '@/components/selectTemplate/selectTemplate.vue'
import onSiteInspectionCheckInIndex from '../../../../onSiteInspectionCheck-In/index.vue'
import recitingDiscipline from './recitingDiscipline.vue'
import enterpriseDownload from './enterpriseDownload.vue'
import extractTemplate from './extractTemplate.vue'
import { 
    spcygetJcqkzgMb,spcysaveFlow,spcysaveJbxx,spcyupdateRyqkmsZjNr,spcyaddJcqkzsMb,spcydeleteJcyj,spcyqueryXcjczjByNowUser,flfgverifyXcjczjWc,flfgxcjczjplwc,
    spcyupdatwXcjczj,spcygetXcjczjMsmbList,spcyselectHistoryMsmb,spcyqueryListXcjcwtBySqsxId,spcyqueryPageXcjcHistoryTkListByXcjcZjId,
    spcyselectHistoryXcjcwt,spcyaddXcjcWt,spcyupdatwXcjcwt,spcyqueryPageTkListByZjId,spcyagainXcjcwttk,spcyaddXcjcwttk,spcydeleteXcjcwttk,
    spcygenerateXcjcConclusion,spcygetJcbgMb,spcygetQxbgMb,spcyaddJcbgMb,spcyaddQxbgMb,spcyqueryXcjcFileMl,commoninitWjjl,uploadPdfFileById,
    spcySqsxWjjldeleteFileById,jcbjdeleteJcdd,spcySqsxWjjlgetLocalFileById,spcydownloadSqsxFileMb,spcyuploadSqsxFile,spcygetXcjcbgFile,
    spcygetXcjcqxbgFile,spcydeleteXcjcwt,getWebOfficeDownloadFile,webOfficeApiopenFile,spcySqsxWjjlmodifyWjMc,openFileReadOnly,wjmbWebOfficeApiopenFileRead,webOfficeApiopenQyFile,
    spcydownloadQysqclFile,getDocxToPdf,againEditPdfOnlineFile,getDocxToPdfAndGz,pdfFileHcCa,wjjbxxPageList,xcjcjdqueryDqJdmc,xcjcjdpreviousNode,
    xcjcjdnextNode,spcyqueryWjMlBySchyJc,spcyqueryWjMlBySchyQy,sqsxYwxxHtmlToFileByXcjchy,sqsxYwxxdownHtmlToFileByXcjchy,
    sqsxYwxxdownHtmlToFileByXcjcjl,spcydownZipZxclQy,sqsxYwxxquerySchyQdjlFj,spcyqueryWjmlByXcjcbl,jcbjjcbjInfo,spcyRsWjmbopenWjjl,jcbjqueryJcmlList,
    flfgxcjczjwc,flfgxcjczjcxbj,flfgqueryWttkList,sqsxYwxxquerySqsxHyPageList,mbzjqueryHbjcBgMl,hbjcgetSxInfo,mbzjqueryjcbgMbList,
    spcyqueryKckWjclList,queryHcyXpList,spcygetJcfaFile,spcyquerySycjcbgList,spcyqueryRyqkmsZjList,initWjgetJcqkzsState,
    mbzjmbMsJcxmTitle,initWjgetJcqkzsDjwc,initWjgetJcqkzsCxbj,initWjgetFxwtState,initWjgetFxwtDjwc,initWjgetFxwtCxbj,initWjgetJcjlState,
    initWjgetJcjlDjwc,initWjgetJcjlCxbj,spcyfxryList,flfgqueryWwcFxwtBySqsxId,flfgqueryYwcFxwtBySqsxId,flfgfxwtDjwc,flfgfxwtCxbj,flfgfxwtXmList,
    spcyMyInfokpdbList,hbjcdelScSxFile,sqsxYwxxhyqxqk,jcbjaddJcml,jcbjupdateJcml,jcbjdeleteJcml,flfgupdateWtOrder,
    jcbjqueryBjRyList,jcbjqueryJcqkList,jcbjdeleteJcqk,jcbjinitXcjcjlFile,initWjxcjcbgQz,
} from './service/index'
 import YchConstant from "@/api/YchConstant";
 import blobType from '@/common/blobType'
 import eventSet from '../taskAcceptance/eventSet.vue'
import { now } from 'xe-utils';
import handlingOpinionsDescribe from '@/components/handling-opinions/handling-opinions-describe.vue'
import assessCheckApi from './service/api'
import moment from 'moment'
import compSelector from '@/components/compSelector/compSelector'
import commpVxeTable from '@/components/commp-vxe-table/commp-vxe-table.vue'
import selectTemplateNoModel from '@/components/selectTemplate/selectTemplate-noModel.vue'
import materialReviewExamination from '../materialReview/examination.vue'
import planProductionProduction from '../planProduction/production.vue'
import {qrcanvas} from 'qrcanvas'
import QRQueryResults from './QRQueryResults.vue'
import store from '@/store'
import { degrees, PDFDocument, rgb, StandardFonts } from 'pdf-lib'
import commpKindeditor from '@/components/commp-kindeditor/commpKindeditor.vue'
import addProblem from './addProblem.vue'
import { CodeSandboxCircleFilled, ConsoleSqlOutlined } from '@ant-design/icons-vue'

export default {
    components:{
        eventSet, handlingOpinionsDescribe, compSelector, commpVxeTable, selectTemplateDownload, serverEditing, serverEditingView, selectTemplateNoModel, selectTemplate, 
        materialReviewExamination, onSiteInspectionCheckInIndex, planProductionProduction, QRQueryResults, chooseTerms, recitingDiscipline, commpKindeditor, addProblem,
        enterpriseDownload, extractTemplate, prepareinspectormIncrease, huHandleModal, handleModal, viewFinalFile, addCheckNotes, previewRecordFile,reimbursement,addCheckDirectories,
        addFileSituation,
    },
    props:{

    },
    data(){
        return{
            modalSpinningPrice:true,
            activeKey:'',
            currentRow:{},
            eventSetKey:null,
            allStatusKey:null,
            onSiteInspectionKey:null,
            //描述模板
            inputSearchKey:null,
            drawerVisible:false,
            drawerKey:null,
            describeLoading:false,
            describeTemp:{},
            paginationDescribe:{
                pageNo:1,
                pageSize:10,
            },
            totalDescribe:0,
            describeList:[],
            fmbnrSearch:'',
            fmbly:'个人',
            paginationKey:null,

            //发现缺陷情况
            overallNum:{
                hjSize:0,
                wcSize:0,
                wwcSize:0,
            },
            overallKey:null,
            chapterList:[],
            chapterRow:{
                index:0,
            },
            chapterActiveKey:'情况描述',
            situationDescriptionVisible:false,
            chapterdrawerKey:null,
            chapterRadio:'我写过的描述',
            searchSituationText:'',
            situationList:[],
            situationLoading:false,
            chapterIssuesList:[],
            chapterIssuesSpinning:false,
            problemHistoryList:[],
            problemHistoryVisible:false,
            problemHistoryLoading:false,
            searchProblemHistoryText:'',
            problemHistoryKey:null,
            currentTerms:{item:{},trem:{}},

            termItemVisible:false,
            termItemKey:null,
            termItemList:[],
            termItemLoading:false,
            searchTermItemText:'',
            reportName:'',

            reportTemplateVisible:false,
            reportTemplateKey:null,
            reportTemplateList:[],
            reportTemplateLoading:false,
            reportTemplateSearchText:'',
            reportTemplatefmbly:'个人',
            programData:{},
            defectReportData:{},
            iframeKey:null,

            //技术审评材料汇总
            materialSummaryList:[],
            chapterIssuesKey:null,
            programDataiframeSrc:'',
            programDataSpinning:false,
            defectReportSpinning:false,
            defectReportDataiframeSrc:'',
            xcjcbjData:{},
            xcjcbjiframeSrc:'',
            programKey:null,
            defectReportKey:null,
            windowInnerHeight:window.innerHeight,
            materialReviewExaminationKey:null,
            planProductionProductionKey:null,
            questionnaireId:'',
            currentSteps:0,
            stepsArr:['首次会议','技术审评记录','审评报告制作','末次会议'],
            firstMeetingInspectionTeamList:[],
            firstMeetingEnterpriseList:[],
            planMaterialsvisible:false,
            canvasKey:null,
            canvasId:'signedVersion'+ new Date().getTime(),
            queryResultsQr:null,
            firstMeetingAndAttachmentData:[],
            autographUrl:'',
            firstMeetingActiveValue:0,
            firstMeetingDataKey:null,
            firstMeetingTableKey:null,
            firstMeetingTableConfig:{
                api:'',
                rowId: 'id',
                height:window.innerHeight - 413,
                autoHidden:true,
                pageSize:100,
                paramet:{
                }
            },
            firstMeetingTableConfig1:{
                api:'',
                rowId: 'id',
                height:window.innerHeight - 413,
                autoHidden:true,
                pageSize:100,
                paramet:{
                }
            },
            firstMeetingTableDataList:[],
            firstMeetingAdaptiveHeight:false,
            firstMeetingMaterialList:[],
            firstMeetingMaterialKey:null,
            currentFirstMeetingData:{},
            firstMeetingTableColumnsVxe:[{
                title: '人员类型', //列头显示文字
                field: 'frylx',
                slots: {
                    default:'frylx_default',
                },
            },{
                title: '签到时间', //列头显示文字
                field: 'fhyqdrq',
                // width: 176
                // width: 150
            },{
                title: '人员签名', //列头显示文字
                field: 'fuserid',
                slots: {
                    default:'fuserid_default',
                },
                // width: 110
            }],
            firstMeetingTableColumnsVxe1:[{
                title: '人员类型', //列头显示文字
                field: 'frylx',
                slots: {
                    default:'frylx_default',
                },
            },{
                title: '部门职务', //列头显示文字
                field: 'fbm',
            },{
                title: '签到时间', //列头显示文字
                field: 'fhyqdrq',
                width: 176
            },{
                title: '人员签名', //列头显示文字
                field: 'fuserid',
                slots: {
                    default:'fuserid_default',
                },
                width: 110
            }],
            firstMeetingTableColumnsVxe2:[{
                title: '人员类型', //列头显示文字
                field: 'frylx',
                slots: {
                    default:'frylx_default',
                },
            },{
                title: '勾选项内容', //列头显示文字
                field: 'wlyczlygx',
                slots: {
                    default:'gxnr_default',
                },
            },{
                title: '可能存在的利益冲突关系', //列头显示文字
                field: 'wlyczlygx',
            },{
                title: '签到时间', //列头显示文字
                field: 'fhyqdrq',
                width: 176
            },{
                title: '声明人签名', //列头显示文字
                field: 'fuserid',
                slots: {
                    default:'fuserid_default',
                },
                width: 110
            }],
            firstMeetingTableColumnsVxe3:[{
                title: '人员类型', //列头显示文字
                field: 'frylx',
                slots: {
                    default:'frylx_default',
                },
            },{
                title: '部门职务', //列头显示文字
                field: 'fbm',
            },{
                title: '签到时间', //列头显示文字
                field: 'fhyqdrq',
                // width: 150
            },{
                title: '承诺人签名', //列头显示文字
                field: 'fuserid',
                slots: {
                    default:'fuserid_default',
                },
                // width: 110
            }],
            firstMeetingMaterialColumnsVxe:[{
                title: '审评组材料目录', //列头显示文字
                field: 'clmc',
            },{
                title: '操作', //列头显示文字
                field: 'options',
                slots: {
                    default:'options_default',
                },
                width: 280
            }],
            firstMeetingMaterialColumnsVxe1:[{
                title: '审评组材料目录', //列头显示文字
                field: 'clmc',
                slots: {
                    default:'clmc_default',
                },
            },{
                title: '文件', //列头显示文字
                field: 'wjList',
                slots: {
                    default:'wjList_default',
                },
            },{
                title: '操作', //列头显示文字
                field: 'options',
                slots: {
                    default:'options_default',
                },
                width: 280
            }],
            xcjcNoteData:{},
            checkNotesList:[],
            finalCheckNotesList:[],
            finalCheckNotesAllList:[],
            personneActiveKey:0,
            situationActiveKey:'技术审评笔记',
            personnelList:[],
            fileSituationList:[],
            finalCheckLeftList:[],
            finalCheckLeftSelectData:{},
            checkNotesSpinning:false,
            checkNotesRightSpinning:false,
            xcjcNoteIframeSrc:'',
            cjcNoteSpinning:false,
            currentXcjcNoteState:{},
            currentLastMeetingData:{},
            lastMeetingSpinning:false,
            lastMeetingIframeSrc:'',
            problemTableKey:null,
            problemTableConfig:{
                api:'',
                rowId: 'id',
                height:window.innerHeight - 413,
                autoHidden:true,
                pageSize:100,
                paramet:{
                }
            },
            problemTableColumnsVxe:[{
                title: '序号',
                field: 'forder',
                slots: {
                    default:'forder_default',
                },
                width: 70
            },{
                title: '缺陷类型',
                field: 'fyzcd',
                slots: {
                    default:'fyzcd_default',
                },
                width: 180
            },{
                title: '缺陷描述',
                field: 'fwtms',
                slots: {
                    default:'fwtms_default',
                },
            },],
            problemTableList:[],
            lastMeetingDisplay:true,
            schyCanvasId:'schyCanvasId'+ new Date().getTime(),
            schyCanvasId2:'schyCanvasId2'+ new Date().getTime(),
            newImage:new Image(),
            queryResultsQr:null,
            queryResultsImgUrl:'',
            firstMeetingRow:{},
            reportList:[],
            reportStatus:true,
            dataViewingStatus:true,
            dataViewingTabKey:'技术审评记录',
            selectReportItem:{},
            reportTabKey:null,
            reportValKey:null,
            zlmlSpinning:false,
            reportViewCheckNotesSpinning:false,
            zlmlIframeSrc:'',
            currentXcjcMLNoteState:{},
            noticeMaterialDataList:[],
            isViewCheckNotes:false,
            noticeMaterialData:[
            // {
            //     name:'审评方案',
            //     fileType:'审评方案',
            //     listType:'jcfaList',
            //     fileList:[],
            // },
            {
                name:'审评员函',
                fileType:'选派专家的函',
                listType:'xpxccydhList',
                fileList:[],
            },{
                name:'观察员函',
                fileType:'选派现场观察员的函',
                listType:'xpxcgcydhList',
                fileList:[],
            },{
                name:'企业通知函',
                fileType:'企业单位审评通知',
                listType:'qydwjctzList',
                fileList:[],
            },{
                name:'审评整改材料要求',
                fileType:'审评整改材料要求',
                listType:'jczgclyqList',
                fileList:[],
            },{
                name:'企业申报材料',
                fileType:'企业申报材料',
                listType:'qysbclList',
                fileList:[],
            },{
                name:'审评报告模板',
                fileType:'技术审评报告',
                listType:'jcbgmbList',
                fileList:[],
            }],
            realname:store.getters.userInfo.realname,//获取用户名
            changeFileNameVal:'',
            changeFileNamevisible:false,
            situationDescriptionSpinning:false,
            situationDescriptionList:[{
                fzjmc:'整体描述',
                isVisible:true,
                loadingState:false,
                dxXh:'一、',
                fwczt:'未完成'
            }],
            twoDescriptionList:[],
            ConclusionExplanationList:[{
                fzjmc:'审评结论',
                isVisible:true,
                key:'fcyjl',
                fwczt:'未完成'
            },{
                fzjmc:'审评缺陷项',
                isVisible:true,
                key:'fjcqxxm',
                fwczt:'未完成'
            },{
                fzjmc:'违法违规问题',
                isVisible:true,
                key:'fwfwgwt',
                fwczt:'未完成'
            },{
                fzjmc:'抽样情况',
                isVisible:true,
                key:'fjccyqk',
                fwczt:'未完成'
            },{
                fzjmc:'需要说明的其他问题',
                isVisible:true,
                key:'fcyqtwt',
                fwczt:'未完成'
            },{
                fzjmc:'审评组处理意见',
                isVisible:true,
                key:'fjczclyj',
                fwczt:'未完成'
            }],
            DefectReportStateData:{},
            InspectionReportStateData:{},
            PersonnelDiscoveredProblemList:[],
            nowUserId:'',
            PersonnelDiscoveredRow:{},
            completedIssueKey:null,
            completedProblemState:true,
            completedIssueTableConfig:{
                api:assessCheckApi.flfgqueryYwcFxwtBySqsxId,
                rowId: 'id',
                autoHidden:true,
                pageSize:100,
                paramet:{
                }
            },
            completedIssueColumnsVxe:[{
                
                title: '序号', //列头显示文字
                field: 'forder',
                slots: {
                    // 使用插槽模板渲染
                    default: 'forder_name',
                },
                width:60,
            },{
                title: '缺陷类型', //列头显示文字
                field: 'fyzcd',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fyzcd_name',
                },
                width:96,
            },{
                title: '缺陷描述', //列头显示文字
                field: 'fwtms',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwtms_name',
                },
            },{
                title: '缺陷依据', //列头显示文字
                field: 'tkList',
                slots: {
                    // 使用插槽模板渲染
                    default: 'tkList_name',
                },
            },{
                title: '对应报告章节', //列头显示文字
                slots: {
                    // 使用插槽模板渲染
                    default: 'zjmc_name',
                },
            },{
                title: '发现人员', //列头显示文字
                field: 'ffxryxm',
                slots: {
                    // 使用插槽模板渲染
                    default: 'ffxryxm_name',
                },
                width:96,
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                fixed: 'right',
                width:203,
            }],
            completedIssueformItem:[],
            onSiteInspectionCheckInKey:null,
            onSiteInspectionCheckInMociKey:null,
            onSiteInspectionCheckInMociShow:false,
            singleUploadLoading:false,
            fxwtXmList:[],
            jxkpJobList:[],
            rckpJobList:[],
            absenceSituationState:false,
            onSiteInspectionSpinning:false,
            screenSate:false,
            screenVisible:false,
            screenInnerHeight:0,
            reimbursementKey:null,
            guideList:[
                [{
                    element: '#pmqh-box',
                    title: '屏幕切换',
                    intro: '点击按钮和按F11都可打开全屏或退出全屏。',
                    position: 'bottom'  // 提示框的位置
                },{
                    element: '#schy-xdxcjc-btn3',//宣读技术审评纪律和廉政纪律
                    title: '宣读文件',
                    intro: '宣读技术审评纪律和廉政纪律',
                    position: 'bottom'  // 提示框的位置
                },{
                    element: '#schy-qrjcfw-btn4',//确认审评范围
                    title: '确认审评范围',
                    intro: '对技术审评进行分配',
                    position: 'bottom'  // 提示框的位置
                },{
                    element: '#schy-jsyaqsx-btn5',//介绍审评要求和注意事项
                    title: '介绍审评要求和注意事项',
                    intro: '',
                    position: 'bottom'  // 提示框的位置
                },{
                    element: '#schy-yjqycl-btn7',//移交企业材料
                    title: '移交企业材料',
                    intro: '可打包和单个下载文件移交给企业',
                    position: 'bottom'  // 提示框的位置
                }],[[
                    {
                        element: '#qkms-tqmub-btn',//移交企业材料
                        title: '提取模板',
                        intro: '提取模板',
                        position: 'bottom'  // 提示框的位置
                    },{
                        element: '#qkms-bcmb-btn',//移交企业材料
                        title: '保存模板',
                        intro: '保存模板',
                        position: 'bottom'  // 提示框的位置
                    },{
                        element: '#qkms-wc-btn',//移交企业材料
                        title: '完成',
                        intro: '完成',
                        position: 'bottom'  // 提示框的位置
                    },{//qkms-cxbj-btn重新编辑
                        element: '#jcbg-zlml-btn',//移交企业材料
                        title: '资料目录',
                        intro: '资料目录',
                        position: 'bottom'  // 提示框的位置
                    },{
                        element: '#jcbg-jcjl-btn',//移交企业材料
                        title: '审评记录',
                        intro: '审评记录',
                        position: 'bottom'  // 提示框的位置
                    },{
                        element: '#jcbg-cyfg-btn',//移交企业材料
                        title: '查阅法规',
                        intro: '查阅法规',
                        position: 'bottom'  // 提示框的位置
                    }
                ]]
                
            ],
            isGuide:false,
            personnelList:[],
            currentPersonneData:{},
            tabStatusArr:[true,true,true,true,true],
            tabPaneStatusArr:[true,true,true,true,true],
            addwtSpinning:false,
            iframeWJkey:null,
        }
    },
    watch:{

    },
    created() {
        // 添加键盘事件监听器
        window.addEventListener('resize', this.handleKeyDown);
    },
    
    beforeDestroy() {
        // 移除键盘事件监听器
        window.removeEventListener('resize', this.handleKeyDown);
    },
    methods:{
        // 头部按钮
        searchBasisClick(){this.$emit('searchBasisClick')},
        refreshClick(){this.$emit('refreshClick');},
        inspectionPlanMaterialsClick(){this.$emit('inspectionPlanMaterialsClick')},
        reimburseClick(row){this.$emit('reimburseClick',row)},

        // 屏幕切换
        handleKeyDown(){
            //console.log('我在切换屏幕',this.screenInnerHeight,window.innerHeight)
            if(this.screenInnerHeight){
                //console.log('5525225',window.innerHeight > this.screenInnerHeight)
                if(window.innerHeight > this.screenInnerHeight){
                    this.screenSate = true
                }else{
                    this.screenSate = false
                }
                if(this.$refs.chooseTermsRef.KeyDownChange){
                    this.$refs.chooseTermsRef.KeyDownChange()
                }
                //console.log('我当前屏幕的状态',this.screenSate)
                this.windowInnerHeight = window.innerHeight
                this.iframeWJkey = Date.now()
                this.iframeKey = Date.now()
            }
        },
        getFullscreen(val){
            let element = document.documentElement;
            this.screenSate = val? (val == '退出全屏'?false:true):document.fullscreenElement?true:false
            //console.log('屏幕状态',val,this.screenSate)
            if(val == '退出全屏' && !this.screenSate){
                if (document.exitFullscreen) {
                    document.exitFullscreen();
                } else if (document.webkitCancelFullScreen) {
                    document.webkitCancelFullScreen();
                } else if (document.mozCancelFullScreen) {
                    document.mozCancelFullScreen();
                } else if (document.msExitFullscreen) {
                    document.msExitFullscreen();
                }
                this.onSiteInspectionKey = Date.now()
                
            }else if(val == '打开全屏' && this.screenSate){
                if (element.requestFullscreen) {
                    element.requestFullscreen();
                } else if (element.webkitRequestFullScreen) {
                    element.webkitRequestFullScreen();
                } else if (element.mozRequestFullScreen) {
                    element.mozRequestFullScreen();
                } else if (element.msRequestFullscreen) {
                    // IE11
                    element.msRequestFullscreen();
                }
                this.onSiteInspectionKey = Date.now()
            }
            this.$nextTick(()=>{
                if(this.currentSteps == 0){
                    this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
                    this.onSiteInspectionCheckInKey = Date.now()
                }else if(this.currentSteps == 3){
                    //console.log('我渲染完末次会议')
                    // this.getMaterialSummary()
                    this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
                    this.onSiteInspectionCheckInMociKey = Date.now()
                }
            })
        },
        guideClick(){//后期去掉
            this.isGuide = !this.isGuide
            this.guideFuntion()
        },
        //指南
        guideFuntion(){
            if(!this.isGuide){
                return
            }
            //console.log('我到指南了',this.currentSteps)
            let stepsArr = this.guideList[this.currentSteps]?JSON.parse(JSON.stringify(this.guideList[this.currentSteps])):[]
            if(this.currentSteps == 0){
                if(this.firstMeetingRow.fstate == '会议登记'){
                    stepsArr.splice(1, 0, {
                        element: '#schy-hydj-btn1',//会议登记
                        title: '会议登记',
                        intro: '对会议的信息和人员进行登记',
                        position: 'bottom'  // 提示框的位置
                    })
                    // stepsArr.splice(2, 0, {
                    //     element: '#schy-lbtabs-xx-box',//签到明细
                    //     title: '签到明细',
                    //     intro: '点击页签切换，查看对应的签到明细',
                    //     position: 'bottom'  // 提示框的位置
                    // })
                }else if(this.firstMeetingRow.fstate == '会议签到'){
                    stepsArr = [{
                        element: '#schy-chryqdm-btn2',//参会人员签到码
                        title: '参会人员签到码',
                        intro: '打开二维码给参会人员进行手机扫码签到',
                        position: 'bottom'  // 提示框的位置
                    },{
                        element: '#schy-lbtabs-xx-box',//签到明细
                        title: '签到明细',
                        intro: '点击页签切换，查看对应的签到明细',
                        position: 'bottom'  // 提示框的位置
                    },{
                        element: '#schy-wcqd-btn6',//完成签到
                        title: '完成签到',
                        intro: '首次会议完成签到',
                        position: 'bottom'  // 提示框的位置
                    }]
                }else if(this.firstMeetingRow.fstate == '会议完成'){
                    //会议完成就不需要在跳出指南
                    return false
                }
            }else if(this.currentSteps == 1){
                stepsArr = [{
                    element: '#jcjl-xzjcji-btn',//签到明细
                    title: '新增审评记录',
                    intro: '新增审评记录',
                    position: 'bottom'  // 提示框的位置
                }]
                
            }else if(this.currentSteps == 2){
                //console.log('指南1')
                stepsArr = []
                let leftArr = []
                let rightArr = []
                // 合并件的报告选择--写在这里--目前没有考虑
                

                if(this.reportStatus){
                    leftArr = [{
                        element: '#jcbg-dwcbg-box',
                        title: '待完成报告',
                        intro: '待完成报告',
                        position: 'right'
                    }]
                }else{
                    leftArr = [{
                        element: '#jcbg-dwcbg-box-0',
                        title: '查看所有报告',
                        intro: '查看所有报告',
                        position: 'bottom'
                    }]
                }
                if(this.dataViewingStatus){//最右边的资料查看
                    //console.log('指南2')
                    rightArr = [{
                        element: '#jcbg-zlml-btn',
                        title: '资料目录',
                        intro: '资料目录',
                        position: 'bottom'
                    },{
                        element: '#jcbg-jcjl-btn',
                        title: '审评记录',
                        intro: '审评记录',
                        position: 'bottom'
                    },{
                        element: '#jcbg-cyfg-btn',
                        title: '查阅法规',
                        intro: '查阅法规',
                        position: 'bottom'
                    }]
                }else{
                    //console.log('指南3')
                    rightArr = [{
                        element: '#jcbg-ckzl-box',
                        title: '查看资料',
                        intro: '查看资料',
                        position: 'bottom'
                    }]
                }
                if(this.activeKey == '审评情况描述'){
                    //console.log('指南4')
                    if(this.currentRow.isZZState){//当前登录人为组长
                        //console.log('指南5')
                        stepsArr = [{//取整体描述--组长一定会存在这个
                            element: '#qkms-tqmub-btn',
                            title: '提取模板',
                            intro: '提取模板',
                            position: 'bottom'
                        },{
                            element: '#qkms-bcmb-btn',
                            title: '保存模板',
                            intro: '保存模板',
                            position: 'bottom'
                        }]
                        if(this.situationDescriptionList[0].fwczt == '已完成'){//判断状态显示不同的按钮
                            stepsArr.splice(2, 0, {
                                element: '#qkms-cxbj-btn',
                                title: '重新编辑',
                                intro: '重新编辑',
                                position: 'bottom'
                            })
                        }else{
                            stepsArr.splice(2, 0, {
                                element: '#qkms-wc-btn',
                                title: '完成',
                                intro: '完成',
                                position: 'bottom'
                            })
                        }
                    }else{//当前登录人非组长
                        //console.log('指南6')
                        if(this.twoDescriptionList.length){//如果分配有审评项目取第一个
                            stepsArr = [{
                                element: '#qkms-tqmub-btn-0',
                                title: '提取模板',
                                intro: '提取模板',
                                position: 'bottom'
                            },{
                                element: '#qkms-bcmb-btn-0',
                                title: '保存模板',
                                intro: '保存模板',
                                position: 'bottom'
                            }]
                            if(this.twoDescriptionList[0].fwczt == '已完成'){//判断状态显示不同的按钮
                                stepsArr.splice(2, 0, {
                                    element: '#qkms-cxbj-btn-0',
                                    title: '重新编辑',
                                    intro: '重新编辑',
                                    position: 'bottom'
                                })
                            }else{
                                stepsArr.splice(2, 0, {
                                    element: '#qkms-wc-btn-0',
                                    title: '完成',
                                    intro: '完成',
                                    position: 'bottom'
                                })
                            }
                        }else{
                            //console.log('指南7')
                            stepsArr=[]
                        }
                    }
                    stepsArr = [...leftArr,...stepsArr,...rightArr]

                }else if(this.activeKey == '发现缺陷情况'){
                    //console.log('指南8')
                    if(this.DefectReportStateData.state){//已生成缺陷报告
                        stepsArr = [{
                            element: '#fxqxqk-cxbjqxx-btn',
                            title: '重新编辑缺陷项',
                            intro: '重新编辑缺陷项',
                            position: 'bottom'
                        }]
                    }else{
                        stepsArr = [{
                            element: '#fxqxqk-tjwt-btn',
                            title: '添加问题',
                            intro: '添加问题',
                            position: 'bottom'
                        },{
                            element: '#fxqxqk-scbg-btn',
                            title: '完成并生成缺陷报告',
                            intro: '完成并生成缺陷报告',
                            position: 'bottom'
                        },{
                            element: '#fxqxqk-ywcwt-box',
                            title: '已完成问题',
                            intro: '已完成问题',
                            position: 'top'
                        }]
                    }
                }else if(this.activeKey == '审评结论及其他说明'){
                    if(this.InspectionReportStateData.state){//已生成缺陷报告
                        stepsArr = [{
                            element: '#jcjl-cxbjjl-btn',
                            title: '重新编辑结论',
                            intro: '重新编辑结论',
                            position: 'bottom'
                        }]
                    }else{
                        stepsArr = [{
                            element: '#jcjl-scjl-btn',
                            title: '生成结论',
                            intro: '生成结论',
                            position: 'bottom'
                        },{
                            element: '#jcjl-scjcbg-btn',
                            title: '完成并生成审评报告',
                            intro: '完成并生成审评报告',
                            position: 'bottom'
                        }]
                    }
                }
            }else if(this.currentSteps == 3){
                stepsArr = [{
                    element: '#mchy-qbcl-box',
                    title: '技术审评结束交回中心材料目录',
                    intro: '技术审评结束交回中心材料目录',
                    position: 'bottom'
                }]
            }
            //console.log('我在指南得到什么列表',stepsArr)
            if(!stepsArr || !stepsArr.length){
                //console.log('我在指南被return出去了',stepsArr)
                return
            }
            this.$nextTick(() => {
                setTimeout(()=>{
                    // DOM更新完成后执行的代码
                    const myElement = document.querySelector('#sceneInspect-guide-box');
                    if (myElement) {
                        //console.log('MMMMMMMMMMMMMMMMMMM',myElement);
                        // 对myElement进行操作
                        var intro = introJs('#sceneInspect-guide-box');
                        intro.setOptions({
                            steps: stepsArr,
                            exitOnOverlayClick: false, // 点击遮罩层时不退出介绍
                            exitOnEsc: false, // 按Esc键时不退出介绍
                            nextLabel: '下一步', // 自定义“下一步”按钮文本
                            prevLabel: '上一步', // 自定义“上一步”按钮文本
                            skipLabel: '跳过', // 自定义“跳过”按钮文本
                            doneLabel: '结束' // 自定义“结束”按钮文本
                            // 其他配置根据需要设置
                        }).start()
                    }
                    intro.onbeforechange (function(callback) {
                        // 当用户导航到教程中的下一个步骤之前触发
                        //console.log('当用户导航到教程中的下一个步骤之前触发', callback);
                    });
                    intro.onafterchange (function(targetElement, elementPosition) {
                        // 当用户导航到教程中的下一个步骤后触发
                        //console.log('当用户导航到教程中的下一个步骤后触发', targetElement, elementPosition);
                    });
                    intro.onchange (function(targetElement, elementPosition) {
                        // 每当用户导航到教程中的新步骤时触发，无论它是前进还是后退
                        //console.log('每当用户导航到教程中的新步骤时触发，无论它是前进还是后退',targetElement, elementPosition);
                    });
                    intro.onexit  (function(targetElement) {
                        // 当用户关闭或完成教程时触发
                        //console.log('当用户关闭或完成教程时触发',targetElement);
                    });
                    intro.onskip  (function(targetElement) {
                        // 当用户跳过教程时触发
                        //console.log('当用户跳过教程时触发',targetElement);
                    });
                    intro.onbeforestart  (function(targetElement) {
                        // 在教程开始之后触发
                        //console.log('在教程开始之后触发',targetElement);
                    });
                    intro.oncomplete  (function(targetElement) {
                        // 当用户完成教程时触发
                        //console.log('当用户完成教程时触发',targetElement);
                    });
                });
            })
        },
        //
        //其他
        async getData(row){
            this.tabStatusArr = [true,true,true,true,true]
            this.tabPaneStatusArr = [true,true,true]
            this.isGuide = false//后期去掉
            this.onSiteInspectionSpinning = true
            this.screenInnerHeight = row.screenInnerHeight
            this.screenSate = false
            //console.log('现在是全屏吗？',document.fullscreenElement)
            this.currentSteps = ''
            this.windowInnerHeight = window.innerHeight
            this.currentRow = row
            this.getFullscreen()//屏幕切换
            
            
            // this.autographUrl = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY +'/zdyFile/downFile?id='
            if(this.currentRow.isZZState){//当前为组长
                let res = await xcjcjdqueryDqJdmc({sqsxid:row.sqsxid})//获取当前步骤
                    if(res.code == 200){
                        //console.log('获取到什么节点',res)
                        this.currentSteps = !res.result || isNaN(Number(res.result)) ? 0: Number(res.result) //this.stepsArr.indexOf(res.result)<0?0:this.stepsArr.indexOf(res.result)
                    }else{
                        this.currentSteps = 0
                        this.onSiteInspectionSpinning = false
                    }
            }else{
                this.currentSteps = this.currentRow.currentRefreshSteps?this.currentRow.currentRefreshSteps:1
            }
            if(this.currentRow.fhbsxzt == 1){//当前为合并件
                await this.getReportData()//多个件加载报告
            }else{
                let dataReport = {}
                dataReport.sqsxid = row.sqsxid
                dataReport.fjcqkzs = this.currentRow.fjcqkzs
                dataReport.fcyjl = this.currentRow.fcyjl
                dataReport.fcyqtwt = this.currentRow.fcyqtwt
                dataReport.fjcqxxm = this.currentRow.fjcqxxm
                dataReport.fwfwgwt = this.currentRow.fwfwgwt
                dataReport.fjccyqk = this.currentRow.fjccyqk
                dataReport.fjczclyj = this.currentRow.fjczclyj
                this.selectReportItem = dataReport//如果不为合并件把单件数据赋值给这个对象，单件和合并件都可共用这个对象的值
                //console.log("我是多个件吗？1",this.selectReportItem)
                // this.getOverallSituation(this.currentRow)
                if(this.currentSteps == 2){
                    await this.currentNum2Change()
                }
            }
            if(this.currentSteps == 0){
                await this.currentNum0Change()
            }else if(this.currentSteps == 1){
                await this.currentNum1Change()
            }else  if(this.currentSteps == 3){
                await this.currentNum3Change()
            }else if(this.currentSteps == 4){
                await this.currentNum4Change()
            }
            if(row.isActiveKey == '技术审评材料汇总'){
                await this.currentNum3Change()
            }
            //isZZState 是否是组长
            //isRwfpFlag 是否选择负责人
            //console.log('我是技术审评',row)
            if(row.isActiveKey == '技术审评材料汇总'){
                await this.currentNum3Change()
            }
            if(!row.noFirstLoad){
                this.activeKey = row.isActiveKey?row.isActiveKey:'审评情况描述'
            }
            this.screenVisible = true
            this.$nextTick(()=>{
                setTimeout(()=>{
                    this.screenVisible = false
                },5000)
            })
            this.onSiteInspectionSpinning = false
            await this.guideFuntion()//指南加载
        },



        async currentNum0Change(){//首次会议
            if(this.tabStatusArr[0]){
                this.tabStatusArr[0] = false
                await this.getHYData()//获取首次会议状态=0
                await this.getFirstMeetingData()//首次会议-人员情况=0
            }
            
            this.$nextTick(()=>{
                this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
                this.onSiteInspectionCheckInKey = Date.now()
            })
        },
        async currentNum1Change(){//审评记录
            if(this.tabStatusArr[1]){
                this.tabStatusArr[1] = false
                await this.getPersonnelData()//审评记录--技术审评笔记=1
            }
        },
        async currentNum2Change(){//审评报告
            if(this.tabStatusArr[2]){
                this.tabStatusArr[2] = false
                this.getDescribeData(this.paginationDescribe,this.fmbnrSearch,this.fmbly)//描述模板--存个人描述模板-暂时不用
                this.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'])//查看目录=2
                await this.getFileState()//查询缺陷报告和审评报告的状态
                await this.currentNum2TabHange()
                // await this.getxcjcbgData()//生成审评报告+生成缺陷报告-末次会议技术审评报告汇总
            }
        },
        currentNum2TabHange(){
            if(this.activeKey == '审评情况描述' && this.tabPaneStatusArr[0]){
                this.tabPaneStatusArr[0] = false
                this.getSituationDescriptionData()//新-审评情况描述
            }else if(this.activeKey == '发现缺陷情况' && this.tabPaneStatusArr[1]){
                this.tabPaneStatusArr[1] = false
                this.getFxryList()//获取发现缺陷情况人员
                this.defectReportChange(this.selectReportItem)//生成缺陷报告
            }else if(this.activeKey == '审评结论及其他说明' && this.tabPaneStatusArr[2]){
                this.tabPaneStatusArr[2] = false
                this.programMemakeChange(this.selectReportItem)//生成审评报告
            }
        },
        async currentNum3Change(){//末次会议
            if(this.tabStatusArr[3]){
                this.tabStatusArr[3] = false
                await this.getERWMData()//满意度调查二维码--目前不用
                await this.getMaterialSummary()//末次会议底部的技术审评材料汇总
               
            }
            await this.getAbsenceSituation()//人员缺席情况材料的状态--在切换末次会议时必须触发
            this.$nextTick(()=>{
                if(this.$refs.onSiteInspectionCheckInMociRef){
                    //console.log('我没有在切换末次会议吗？',{sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
                    this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
                    this.onSiteInspectionCheckInMociKey = Date.now()
                }
                
            })
        },
        async currentNum4Change(){//报销申请
            this.$nextTick(()=>{
                this.$refs.reimbursementRef.getData({sqsxid:this.currentRow.sqsxid,view:false,heightType:'isReviewVer'})
                this.reimbursementKey = Date.now()
            })          
        },






        getPendingEvaluation(){//评价
            spcyMyInfokpdbList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log(res)
                    this.jxkpJobList = res.result.jxkpJobList
                    this.rckpJobList = res.result.rckpJobList
                }else{
                    this.jxkpJobList = []
                    this.rckpJobList = []
                }
            })
        },
        pendingEvaluationClick(){
            spcyMyInfokpdbList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('有评价吗？',res)
                    this.jxkpJobList = res.result.jxkpJobList
                    this.rckpJobList = res.result.rckpJobList
                    if((res.result.jxkpJobList && res.result.jxkpJobList.length) || (res.result.rckpJobList && res.result.rckpJobList.length)){
                        const $pulldown = this.$refs.pulldownpjRef
                        if ($pulldown) {
                            $pulldown.togglePanel()
                        }
                    }else{
                        this.$message.warning('暂无需评价')
                    }
                }else{
                    this.$message.warning('暂无需评价')
                }
            })
            
        },
        assessment(val,row){
            if(val == '日常考评'){
                let data = {
                    jobid:row.id,
                    fhjmc:row.fhjmc == '现场检查'?'技术审查':row.fhjmc,
                    sqsxid:this.currentRow.sqsxid,
                }
                if(row.fhjmc == '检查员互评'){
                    this.$refs.huHandleModalRef.getData(data,false)
                    this.$refs.huHandleModalRef.huHandleModalVisible = true
                }
                if(row.fhjmc == '经办人审核'){
                    this.$refs.handleModalRef.getData(data,true,false)
                    this.$refs.handleModalRef.handleModalVisible = true
                }
                if(row.fhjmc == '科室复核'){
                    this.$refs.handleModalRef.getData(data,true,true)
                    this.$refs.handleModalRef.handleModalVisible = true
                    this.$refs.handleModalRef.isBlyj = true
                }
            }else{
                //console.log(row)
                this.$refs.prepareinspectormIncreaseRef.getData({...row,ybid:'',jobid:row.id})
            }
        },
        huHandleSuccess(){
            this.getPendingEvaluation()
        },
        getAbsenceSituation(){//缺席情况
            sqsxYwxxhyqxqk({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.absenceSituationState = res.result == 1?true:false
                }else{
                    this.absenceSituationState = false
                }
            })
        },
        getxcjcbgData(){
            if( this.currentSteps == 2){
                this.programMemakeChange(this.selectReportItem)//生成审评报告
                this.defectReportChange(this.selectReportItem)//生成缺陷报告
            }else{
                this.getMaterialSummary()//末次会议- 技术审评材料汇总
            }
        },
        getERWMData(){//满意度调查二维码
            this.queryResultsQr = qrcanvas({
                data: bootConfig[process.env.NODE_ENV].EXTERNAL_ACCESS_URL2+process.env.BASE_URL+`businessManagementSatisfactionSurvey?obj=`+JSON.stringify({sqsxid:this.currentRow.sqsxid})|| "二维码生成中",
                size:260,
                background:'#fff'
            })
            this.queryResultsImgUrl = this.newImage.src = this.queryResultsQr.toDataURL("image/png")
            this.$nextTick(()=>{
                setTimeout(()=>{
                    var canvas = document.getElementById(this.schyCanvasId);
                    var context = canvas.getContext('2d');
                    context.font = "16px Arial"
                    context.textAlign = "center"
                    // context.globalCompositeOperation = 'source-in';
                    context.fillStyle = "#000";
                    context.background = '#fff'
                    context.fillText('满意度调查',80,15);
                    var img = new Image();
                    img.onload = function() {
                        context.drawImage(img, 20, 20,125,125);
                    }
                    img.src = this.queryResultsQr.toDataURL("image/png");
                    var canvas2 = document.getElementById(this.schyCanvasId2);
                    var context2 = canvas2.getContext('2d');
                    context2.font = "22px Arial"
                    context2.textAlign = "center"
                    // context.globalCompositeOperation = 'source-in';
                    context2.fillStyle = "#000";
                    context2.background = '#fff'
                    context2.fillText('满意度调查',150,22);
                    var img2 = new Image();
                    img2.onload = function() {
                        context2.drawImage(img, 20, 40,260,260);
                    }
                    img2.src = this.queryResultsQr.toDataURL("image/png");
                },200)
            })
        },
        //新-审评情况描述
        async getSituationDescriptionData(){
            let ztmsZt = '未完成'
            let fjcxmbt = ''
            let fjcxmXh = ''
            let fmsmbbt = ''
            let fmsmbXh = ''
            this.situationDescriptionSpinning = true
            await initWjgetJcqkzsState({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                if(res.code == 200){
                    ztmsZt = res.result?'已完成':'未完成'
                }else{
                    ztmsZt = '未完成'
                }
            })
            await mbzjmbMsJcxmTitle({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('我获取到什么标题',res.result)
                    fjcxmbt = res.result.fjcxmbt?res.result.fjcxmbt:'二、审评情况汇总评估'
                    fmsmbbt = res.result.fmsmbbt?res.result.fmsmbbt:'一、整体描述'
                }else{
                }
            })
            await spcyqueryRyqkmsZjList({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('新-获取审评情况描述的数据',res.result.zjList)
                    if(res.result && res.result.zjList && res.result.zjList.length){
                        let list = res.result.zjList.map((a,i)=>{return{...a,fzjmc:a.fzjmc.indexOf('）') !== -1?a.fzjmc.slice(a.fzjmc.indexOf('）')+1):a.fzjmc,isVisible:a.fwczt == '已完成'?false:true,loadingState:false,dxXh:a.fzjmc.indexOf('）') !== -1?a.fzjmc.slice(0, a.fzjmc.indexOf('）')+1):''}})
                        // this.situationDescriptionList = [{fzjmc:'整体描述',dxXh:'一、',isVisible:true,loadingState:false,fwczt:ztmsZt},...list]
                        this.situationDescriptionList = [{
                            fzjmc:fmsmbbt,
                            dxXh:'',
                            isVisible:ztmsZt=='已完成'?false:true,
                            loadingState:false,
                            fwczt:ztmsZt}
                        ,{
                            fzjmc:fjcxmbt,
                            isVisible:true,
                            loadingState:false,
                            fwczt:'',
                            dxXh:'',
                        }]
                        this.twoDescriptionList = list
                        //console.log('新-获取审评情况描述的数据1',this.situationDescriptionList)
                    }else{
                        this.situationDescriptionList = [{
                            fzjmc:fmsmbbt,
                            isVisible:ztmsZt=='已完成'?false:true,
                            loadingState:false,
                            fwczt:ztmsZt,
                            dxXh:'',
                        },{
                            fzjmc:fjcxmbt,
                            isVisible:true,
                            loadingState:false,
                            fwczt:'',
                            dxXh:'',
                        }]
                        this.twoDescriptionList = []
                    }
                    
                }else{
                    this.situationDescriptionList = [{
                        fzjmc:fmsmbbt,
                        isVisible:ztmsZt=='已完成'?false:true,
                        loadingState:false,
                        fwczt:ztmsZt,
                        dxXh:'',
                    },{
                            fzjmc:fjcxmbt,
                            isVisible:true,
                            loadingState:false,
                            fwczt:'',
                            dxXh:'',
                        }]
                    this.twoDescriptionList = []
                }
                this.situationDescriptionSpinning = false
            })
        },
        situationVisible(item,index,type){
            if(type){
                this.situationDescriptionList.splice(index,1,{...item,isVisible:!item.isVisible})
            }else{
                this.twoDescriptionList.splice(index,1,{...item,isVisible:!item.isVisible})
            }
            
        },
        ConclusionVisible(item,index){
            this.ConclusionExplanationList.splice(index,1,{...item,isVisible:!item.isVisible})
        },
        //提取模板
        extractTemplateClick(item,index){
            
            this.$refs.extractTemplateRef.getData({sqsxid:this.selectReportItem.sqsxid,item,index,title:'提取模板',addTemp:false,})
            this.$refs.extractTemplateRef.visible = true
        },
        //保存模板
        saveTemplateClick(item,index,type){
            //console.log(item.fzjmc)
            //console.log(this.selectReportItem.fjcqkzs)
            item = {
                ...item,
                fjcms:type?this.selectReportItem.fjcqkzs:item.fjcms
            }
            this.$refs.extractTemplateRef.getData({sqsxid:this.selectReportItem.sqsxid,item,index,title:'新增模板',isAdd:true,addTemp:true,})
            this.$refs.extractTemplateRef.visible = true
        },
        situationComplete(item,index,type){
            if(type){
                initWjgetJcqkzsDjwc({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.situationDescriptionList.splice(index,1,{...item,fwczt:item.fwczt == '已完成'?'未完成':'已完成',isVisible:item.fwczt == '已完成'?false:true})
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                let data = {
                    fsqsxid:this.selectReportItem.sqsxid,
                    id:item.id,
                }
                flfgxcjczjwc(data).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        spcyqueryRyqkmsZjList({sqsxid:this.selectReportItem.sqsxid}).then(res1=>{
                            if(res.code == 200){
                                if(res.result && res.result.zjList && res.result.zjList.length){
                                    res.result.zjList.forEach((item,index)=>{
                                        this.twoDescriptionList.splice((index+1),1,{...item,isVisible:this.twoDescriptionList[index+1].isVisible,loadingState:false,})
                                    })
                                }else{
                                    this.twoDescriptionList.splice(index,1,{...item,fwczt:item.fwczt == '已完成'?'未完成':'已完成',isVisible:false})
                                }
                                
                                // this.situationDescriptionList = [this.situationDescriptionList[0],...list]
                                // //console.log('新-获取审评情况描述的数据2',this.situationDescriptionList)
                            }else{
                                this.twoDescriptionList.splice(index,1,{...item,fwczt:item.fwczt == '已完成'?'未完成':'已完成'})
                            }
                        })
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
            
        },
        situationReEdit(item,index,type){
            if(type){
                initWjgetJcqkzsCxbj({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.situationDescriptionList.splice(index,1,{...item,fwczt:item.fwczt == '已完成'?'未完成':'已完成',isVisible:item.fwczt == '已完成'?false:true})
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                let data = {
                    fsqsxid:this.selectReportItem.sqsxid,
                    id:item.id,
                }
                flfgxcjczjcxbj(data).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        spcyqueryRyqkmsZjList({sqsxid:this.selectReportItem.sqsxid}).then(res1=>{
                            if(res.code == 200){
                                if(res.result && res.result.zjList && res.result.zjList.length){
                                    res.result.zjList.forEach((item,index)=>{
                                        this.twoDescriptionList.splice((index+1),1,{...item,isVisible:this.twoDescriptionList[i+1].isVisible,loadingState:false,})
                                    })
                                }else{
                                    this.twoDescriptionList.splice(index,1,{...item,fwczt:item.fwczt == '已完成'?'未完成':'已完成',isVisible:item.fwczt == '已完成'?false:true})
                                }
                                
                                // this.situationDescriptionList = [this.situationDescriptionList[0],...list]
                                // //console.log('新-获取审评情况描述的数据2',this.situationDescriptionList)
                            }else{
                                this.twoDescriptionList.splice(index,1,{...item,fwczt:item.fwczt == '已完成'?'未完成':'已完成',isVisible:item.fwczt == '已完成'?false:true})
                            }
                        })
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
        },
        //查询缺陷报告和审评报告的
        async getFileState(val,isBtn){
            if((val && val.indexOf('缺陷报告状态') !== -1 ) || !val){
                let res = await initWjgetFxwtState({sqsxid:this.selectReportItem.sqsxid})
                // .then(res=>{
                    if(res.code == 200){
                        //console.log('获取问题的状态',res)
                        this.DefectReportStateData.state = res.result
                        if(isBtn){//点击按钮改变状态
                            if(this.DefectReportStateData.state){
                                await this.defectReportChange(this.selectReportItem)
                                // this.$nextTick(()=>{
                                //     if(this.$refs.selectTemplateNoModel2Ref && this.$refs.selectTemplateNoModel2Ref.getSelectTemplate){
                                //         this.$refs.selectTemplateNoModel2Ref.getSelectTemplate({},'技术审评缺陷记录表',this.selectReportItem.sqsxid,this.currentRow.fhbsxzt)
                                //         this.$refs.selectTemplateNoModel2Ref.selectTemplateVisible = true
                                //     }
                                // })
                            }else{
                                await this.getQueryQuestions(this.PersonnelDiscoveredRow)
                            }
                            await this.guideFuntion()
                        }
                    }else{
                        this.DefectReportStateData.state = false
                    }
                // })
            }
            if((val && val.indexOf('审评报告状态') !== -1 ) || !val){
                let res = await initWjgetJcjlState({sqsxid:this.selectReportItem.sqsxid})
                // .then(res=>{
                    if(res.code == 200){
                        this.InspectionReportStateData.state = res.result
                        this.reportTabKey = Date.now()
                        if(isBtn){//点击按钮改变状态
                            if(this.InspectionReportStateData.state){
                                await this.programMemakeChange(this.selectReportItem)
                                // this.$nextTick(()=>{
                                //     if(this.$refs.selectTemplateNoModelRef && this.$refs.selectTemplateNoModelRef.getSelectTemplate){
                                //         this.$refs.selectTemplateNoModelRef.getSelectTemplate({},'技术审评报告',this.selectReportItem.sqsxid,this.currentRow.fhbsxzt)
                                //         this.$refs.selectTemplateNoModelRef.selectTemplateVisible = true
                                //     }
                                // })
                            }else{

                            }
                            await this.guideFuntion()
                        }
                    }else{
                        this.InspectionReportStateData.state = false
                    }
                // })
            }
        },
        async completeDefectDescriptionClick(val){//发现缺陷情况完成生成缺陷报告/重新编辑
            this.onSiteInspectionSpinning = true
            if(val == '完成'){
                await initWjgetFxwtDjwc({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.getFileState(['缺陷报告状态'],true)
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.onSiteInspectionSpinning = false
                })
            }else if(val == '重新编辑'){
                await initWjgetFxwtCxbj({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.getFileState(['缺陷报告状态'],true)
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.onSiteInspectionSpinning = false
                })
            }
        },
        async completeInspectionReportClick(val){//审评结论完成生成审评报告/重新编辑
            this.onSiteInspectionSpinning = true
            if(val == '完成'){
                await initWjgetJcjlDjwc({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.getFileState(['审评报告状态'],true)
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.onSiteInspectionSpinning = false
                })
            }else if(val == '重新编辑'){
                await initWjgetJcjlCxbj({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.getFileState(['审评报告状态'],true)
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.onSiteInspectionSpinning = false
                })
            }
        },
        

        //=============审评方案拟定========================
        async getPreparationOfInspectionPlan(val,csh){
            this.zlmlSpinning = true
            this.noticeMaterialDataList = []
            let arr = []
            if(val.indexOf('审评方案') !== -1){
                //审评方案
                
                await spcygetJcfaFile({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    this.noticeMaterialDataList.push({
                        name:'审评方案',
                        fileType:'审评方案',
                        listType:'jcfaList',
                        fileList:[]
                    })
                    if(res.code == 200){
                        
                        if(this.currentRow.fhbsxzt == 1){
                            if(res.result.length){
                                this.noticeMaterialDataList.push(...res.result)
                            }
                        }else{
                            this.noticeMaterialDataList.push(res.result.length?res.result[0]:{})
                        }
                        
                    }
                })
            }
            if(val.indexOf('上一次符合性审评报告') !== -1){
                spcyquerySycjcbgList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    this.noticeMaterialDataList.push({
                        name:'上一次符合性审评报告',
                        fileType:'上一次符合性审评报告',
                        listType:'sycfhxbgList',
                        fileList:[],
                    })
                    if(res.code == 200){
                        let data = []
                        data = res.result.sycfhxbgList.map((a,i)=>{return {...a,currentType:'上一次符合性审评报告'}})
                        this.noticeMaterialDataList.push(...data)
                    }else{
                    }
                    
                })
            }
            
            // if(val.indexOf('通知材料') !== -1){
            //     await queryHcyXpList({sqsxid:this.currentRow.sqsxid}).then(res=>{
            //         if(res.code == 200){
            //             //console.log('通知材料制作',res.result)
            //             let data = res.result
            //             for(let key in data){
            //                 this.noticeMaterialData.forEach((item,index)=>{
            //                     if(item.listType == key){
            //                         this.noticeMaterialDataList.push(item,...data[key])
            //                     }
            //                 })
            //             }
            //             this.noticeMaterialKey = Date.now()
            //         }else{
            //             // this.$message.warning(res.message)
            //         }
                    
            //     })
            // }
            if(val.indexOf('企业申报材料') !== -1){
                await spcyqueryKckWjclList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    this.noticeMaterialDataList.push({
                        name:'企业申报材料',
                        fileType:'企业申报材料',
                        listType:'qysbclList',
                        fileList:[],
                    })
                    if(res.code == 200){
                        let data = []
                        data = res.result.map((a,i)=>{return {...a,currentType:'企业申报材料'}})
                        this.noticeMaterialDataList.push(...data)
                    }else{
                    }
                })
            }
            if(val.indexOf('审评报告模板') !== -1){
                await mbzjqueryjcbgMbList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    this.noticeMaterialDataList.push({
                        name:'审评报告模板',
                        fileType:'技术审评报告',
                        listType:'jcbgmbList',
                        fileList:[],
                    })
                    if(res.code == 200){
                        let data = []
                        data = res.result.map((a,i)=>{return {...a,currentType:'审评报告模板'}})
                        this.noticeMaterialDataList.push(...data)
                    }else{
                    }
                })
            }
            let nums = 0
            this.noticeMaterialDataList.forEach((item,index)=>{
                if((item.fwjxsmc || item.fclmc) && !nums){
                    nums = 1
                    this.selectmlNoteItem({...item,index:index})
                    this.zlmlSpinning = false
                }
            })
            // if(!(this.xcjcNoteData.wjList && this.xcjcNoteData.wjList.length)){
            //     let num = ''
            //     this.noticeMaterialDataList.forEach((item,index)=>{
            //         if((item.fwjxsmc || item.fclmc) && !num){
            //             this.selectmlNoteItem(item)
            //             num = 1
            //         }
            //     })
            // }
        },
        // 
        getReportData(){
            mbzjqueryHbjcBgMl({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('多事项报告模板',res.result.records)
                    if(res.result.records && res.result.records.length){
                        this.reportList = res.result.records
                        this.selectReportChange(this.reportList[0],0)
                    }else{
                        this.selectReportItem = {sqsxid:this.currentRow.sqsxid,}
                        //console.log("我是多个件吗？2",this.selectReportItem)
                        this.selectReportChange(this.currentRow,0)
                    }
                }else{
                    this.selectReportItem = {sqsxid:this.currentRow.sqsxid}
                    //console.log("我是多个件吗？3",this.selectReportItem)
                    this.selectReportChange(this.currentRow,0)
                }
            })
        },
        async getReportDetails(){
            await hbjcgetSxInfo({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('我获取的申请事项合并详情',res.result)
                    this.selectReportItem.fjcqkzs = res.result.fjcqkzs
                    this.selectReportItem.fcyjl = res.result.fcyjl
                    this.selectReportItem.fcyqtwt = res.result.fcyqtwt
                    this.selectReportItem.fjcqxxm = res.result.fjcqxxm
                    this.selectReportItem.fwfwgwt = res.result.fwfwgwt
                    this.selectReportItem.fjccyqk = res.result.fjccyqk
                    this.selectReportItem.fjczclyj = res.result.fjczclyj
                }else{
                    this.selectReportItem.fjcqkzs = this.currentRow.fjcqkzs
                    this.selectReportItem.fcyjl = this.currentRow.fcyjl
                    this.selectReportItem.fcyqtwt = this.currentRow.fcyqtwt
                    this.selectReportItem.fjcqxxm = this.currentRow.fjcqxxm
                    this.selectReportItem.fwfwgwt = this.currentRow.fwfwgwt
                    this.selectReportItem.fjccyqk = this.currentRow.fjccyqk
                    this.selectReportItem.fjczclyj = this.currentRow.fjczclyj
                }
                this.reportValKey = Date.now()
            })
        },
        async selectReportChange(item,index){//
            this.selectReportItem = {sqsxid:item.sqsxid,bgmc:item.bgmc?item.bgmc:''}
            await this.getReportDetails()//获取的申请事项合并详情
            if(this.currentSteps == 2){
                await this.currentNum2Change()
            }
            
            // //console.log("我是多个件吗？4",this.selectReportItem)
            
            // // this.getOverallSituation(this.selectReportItem)
            // // this.getQueryQuestions(this.chapterRow)
            // this.getxcjcbgData()//生成审评报告+生成缺陷报告-末次会议技术审评报告汇总
            // this.defectReportChange(this.selectReportItem)//生成缺陷报告
            
            // this.getSituationDescriptionData()//新-审评情况描述
            // this.getFxryList()//获取发现缺陷情况人员
            // this.activeKey = '审评情况描述'
            // this.getFileState()//查询缺陷报告和审评报告的
            // setTimeout(()=>{
            //     this.reportTabKey = Date.now()
            // },200)
        },
        selectReportClick(item,index){//切换报告
            this.selectReportChange(item,index)
        },
        clickEvent3(){
            const $pulldown = this.$refs.pulldownRef
            if ($pulldown) {
                $pulldown.togglePanel()
                // hidePanel
            }
        },
        //右边区域页签
        dataViewingPaneChange(){

        },
        async getHYData(){
            // fhyzt:,id:row.id,frylx:'企业',fhylx:'首次会议',sqsxid:this.currentRow.sqsxid
            await sqsxYwxxquerySqsxHyPageList({fhylx:'首次会议',sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.firstMeetingRow = res.result.records && res.result.records.length ?res.result.records[0]:{}
                }else{
                    this.firstMeetingRow = {}
                }
            })
        },
        async completeRegistrationChange(val){//会议完成点击触发的方法
            if(val == '首次会议'){
                await this.getFirstMeetingData(this.firstMeetingActiveValue)
                
            }else{
                await this.getMaterialSummary()//末次会议-技术审评材料汇总
            }
            await this.getHYData()
            await this.getAbsenceSituation()
            await this.guideFuntion()
        },
        fqxqksmChange(){
            this.getAbsenceSituation()
        },
        async firstMeetingReviseClick(row){ //点击会议登记
            await this.$refs.onSiteInspectionCheckInIndexRef.reviseClick(row)
            await this.guideFuntion()
        },
        firstMeetingShareQRCodeClick(row){
            this.$refs.onSiteInspectionCheckInIndexRef.shareQRCodeClick(row)
        },
        async firstMeetingSuccessSignIn(row){
            this.$refs.onSiteInspectionCheckInIndexRef.successSignIn(row)
            
        },
        //移交企业材料
        handoverMaterialsChange(){
            this.$refs.enterpriseDownloadRef.getData(this.currentRow)
            this.$refs.enterpriseDownloadRef.visible = true
        },
        //获取首次人员和表的情况
        getFirstMeetingData(val){
            val = val?val:0
            this.firstMeetingTableColumnsVxe = []
            this.firstMeetingTableDataList = []
            sqsxYwxxquerySchyQdjlFj({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('获取首次人员和表的情况',res)
                    
                    this.firstMeetingAndAttachmentData = res.result
                    this.firstMeetingActiveValue = val
                    this.currentFirstMeetingData = res.result && res.result.length?res.result[val]:{}
                    this.firstMeetingTableColumnsVxe = this.currentFirstMeetingData.clmc == '技术审评会议签到表'?this.firstMeetingTableColumnsVxe1:(this.currentFirstMeetingData.clmc == '无利益冲突声明'?this.firstMeetingTableColumnsVxe2:this.firstMeetingTableColumnsVxe3)
                    this.firstMeetingAdaptiveHeight = this.currentFirstMeetingData.clmc == '技术审评会议签到表'?true:false
                    this.firstMeetingTableConfig1.height = this.currentFirstMeetingData.clmc == '技术审评会议签到表'?135:window.innerHeight - 413

                    this.firstMeetingTableDataList = res.result && res.result.length?res.result[val].qdList:true
                    this.firstMeetingMaterialList = res.result && res.result.length?(this.currentFirstMeetingData.clmc == '技术审评审评员承诺书' || this.currentFirstMeetingData.clmc == '无利益冲突声明'?(res.result[val].wjList && res.result[val].wjList.length?res.result[val].wjList:true):[res.result[val]]):true
                    this.firstMeetingDataKey = Date.now()
                    this.firstMeetingMaterialKey = Date.now()
                    this.firstMeetingTableKey  = Date.now()
                }else{
                    this.firstMeetingAndAttachmentData = []
                }
            })
        },
        firstMeetingTabChange(val){
            //console.log(val)
            this.getFirstMeetingData(val)
        },
        schylinkClick(){
            var link = document.createElement('a');
            link.target='_blank'
            link.href = bootConfig[process.env.NODE_ENV].EXTERNAL_ACCESS_URL2+process.env.BASE_URL+`businessManagementSatisfactionSurvey?obj=`+JSON.stringify({sqsxid:this.currentRow.sqsxid})|| "二维码生成中",
            link.click();
        },
        schydownloadQRCode(val){
            var canvas = document.getElementById(this.schyCanvasId2);
            var dataURL = canvas.toDataURL('image/png');
            // 创建一个链接元素
            var link = document.createElement('a');
            link.download = '满意度调查二维码.png'; // 设置图片名称
            link.href = dataURL; // 设置图片链接
            link.click(); // 模拟点击链接，下载图片
        },
        schycopyLink(val) {
            var link = document.createElement('a');
            link.href = bootConfig[process.env.NODE_ENV].EXTERNAL_ACCESS_URL2+process.env.BASE_URL+`businessManagementSatisfactionSurvey?obj=`+JSON.stringify({sqsxid:this.currentRow.sqsxid})|| "二维码生成中"
            const copyInput = document.createElement('input');
            copyInput.value = link.href;
            document.body.appendChild(copyInput);
            copyInput.select();
            document.execCommand('copy');
            document.body.removeChild(copyInput);
            this.$message.success('链接已复制！')
        },
        //技术审评记录
        getPersonnelData(){
            jcbjqueryBjRyList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('获取到什么人员',res)
                    this.personnelList = res.result
                    this.currentPersonneData =  res.result &&  res.result.length? this.personnelList[0]:{}
                    this.getNoteData()//审评笔记
                    
                }else{
                    this.personnelList = []
                }
            })
        },
        async personneTabChange(val){
            this.finalCheckNotesList = []
            this.fileSituationList = []
            this.finalCheckLeftSelectData = {}
            this.currentPersonneData = this.personnelList[val]
            await this.getCheckNotesLeft()
            await this.getCheckNotesRight()
            this.getFileSituation()
        },
        situationTabChange(val){
            if(this.currentSteps == 2){
                if(val == '技术审评笔记'){
                    this.finalCheckNotesList = this.finalCheckNotesList.map((item,index)=>{return{...item,textlength:document.getElementById('reportViewFmsnr'+index).offsetHeight > 135?true:false}})
                }else{
                    this.fileSituationList = this.fileSituationList.map((item,index)=>{return{...item,textlength:document.getElementById('fileSituationFqyzxqk'+index).offsetHeight > 135?true:false}})
                }
            }
            
        },
        async getNoteData(row,type){
            
            //最开始
            // spcyqueryWjmlByXcjcbl({sqsxid:this.currentRow.sqsxid}).then(res=>{
            //     if(res.code == 200){
            //         //console.log('技术审评记录得到什么数据',res)
            //         this.xcjcNoteData = res.result && res.result.length?res.result[0]:{}
            //         this.currentXcjcNoteState = this.xcjcNoteData.wjList && this.xcjcNoteData.wjList.length?this.xcjcNoteData.wjList[row?row.index:0]:{}
            //         this.currentXcjcNoteState.index = row?row.index:0
            //         if(!this.isViewCheckNotes){
            //             this.selectNoteItem(this.currentXcjcNoteState)
            //             this.selectmlNoteItem(this.xcjcNoteData.wjList && this.xcjcNoteData.wjList.length?this.xcjcNoteData.wjList[0]:{})
            //         }
            //     }else{
            //         this.xcjcNoteData = {}
            //     }
            // })
            
            
            this.checkNotesSpinning = true
            this.getFileSituation()
            await this.getCheckNotesLeft()
            await this.getCheckNotesRight()
            
        },
        //审评笔记左边列表
        async getCheckNotesLeft(){
            
            //左边
            let leftRes = await jcbjqueryJcmlList({sqsxid:this.currentRow.sqsxid,fuserid:this.currentPersonneData.fuserid})
            //console.log('笔记的左边得到什么列表',leftRes)
            if(leftRes.code == 200 && leftRes.result && leftRes.result.length){
                //console.log('笔记的左边得到什么列表',leftRes)
                this.finalCheckLeftList = leftRes.result
            }else{
                this.finalCheckLeftList = []
            }
            this.$nextTick(()=>{
                setTimeout(()=>{
                    this.checkNotesSpinning = false
                },1000)
            })
        },
        //审评笔记右边列表
        async getCheckNotesRight(){
            this.checkNotesRightSpinning = true
            //右边
            let checkNotesRes =  await jcbjjcbjInfo({sqsxid:this.currentRow.sqsxid,fmlid:this.finalCheckLeftSelectData.id,fuserid:this.currentPersonneData.fuserid})
            // if(checkNotesRes.code == 200){
            //console.log('技术审评记录得到什么数据2',checkNotesRes)
            this.checkNotesList = []
            this.finalCheckNotesList = []
            if(checkNotesRes.result && checkNotesRes.result.length){
                //console.log('技术审评记录得到什么数据1111111')
                for(let index = 0; index <= checkNotesRes.result.length-1; index++){
                    let item = checkNotesRes.result[index]
                    let sumArr = []
                    //console.log('技术审评记录得到什么数据22222')
                    if(item.wjList && item.wjList.length){
                        //console.log('技术审评记录得到什么数据33333',item.wjList)
                        for(let tIndex = 0; tIndex <= item.wjList.length-1; tIndex++){
                            let trem = item.wjList[tIndex]
                            //console.log('技术审评记录得到什么数据base6455555',trem,tIndex)
                            let base64Url = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+trem.id
                            // await this.convertFiles(trem)
                            let arr = sumArr.filter(i=>{i.id == trem.id})
                            if(!arr.length){
                                sumArr.push({...trem,base64Url:base64Url})
                            }
                            //console.log('技术审评记录得到什么数据base64',base64Url)
                        }
                    }
                    let itemArr = this.checkNotesList.filter(i=>{i.dd.id == item.dd.id})
                    if(!itemArr.length){
                        let data = {
                            ...item,
                            wjList:sumArr
                        }
                        this.checkNotesList.push(data)
                    }
                }
            }
            this.finalCheckNotesList = this.checkNotesList
            this.$nextTick(()=>{
                setTimeout(()=>{
                    this.checkNotesRightSpinning = false
                    if(this.currentSteps == 2){
                        if(this.situationActiveKey == '技术审评笔记'){
                            this.finalCheckNotesList = this.finalCheckNotesList.map((item,index)=>{return{...item,textlength:document.getElementById('reportViewFmsnr'+index).offsetHeight > 135?true:false}})
                            this.reportViewCheckNotesSpinning = false
                        }
                    }
                },200)
            })
        }, 
        async convertFiles(row) {//转化文件
            try {
                //请求接口
                let res = await spcyRsWjmbopenWjjl({id:row.id})
                let base64 = await "data:image/png;base64," +
                                btoa( new Uint8Array(res).reduce( (data, byte) => data + String.fromCharCode(byte), "" ))
                // //console.log('得到什么base64位',base64)
                return base64
            } catch (error) {
                //console.log('处理某个文件错误',row)
                //console.log('处理文件错误',error)
                return ''
            }
        },
        selectCheckDirectories(item){
            this.finalCheckLeftSelectData = item
            this.getCheckNotesRight()
        },
        //添加记录
        addCheckNotesClick(row){
            this.$refs.addCheckNotesRef.getData({sqsxid:this.currentRow.sqsxid,fuserid:this.currentPersonneData.fuserid,...row})
            this.$refs.addCheckNotesRef.visible = true
        },
        addCheckDirectoriessuccess(){
            this.getCheckNotesLeft()
        },
        addCheckDirectories(row){
            this.$refs.addCheckDirectoriesRef.getData({sqsxid:this.currentRow.sqsxid,fuserid:this.currentPersonneData.fuserid,...row})
            this.$refs.addCheckDirectoriesRef.visible = true
        },
        deleteCheckDirectories(row){
            //console.log('我点击了')
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                content: h => <div style="color:red;font-size:18px;">提示：这个目录下的记录也会删除掉</div>,
                onOk() {
                    jcbjdeleteJcml({id:row.id}).then(res=>{
                        if(res.code == 200){
                            that.getCheckNotesLeft()
                            // that.getMaterialSummary(val,'删除')
                            that.$message.success('删除成功')
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        addCheckNotesSuccess(){//添加成功后
            this.getCheckNotesRight()
        },
        viewInspectionRecordsClick(){//在审评报告查看审评记录
            this.isViewCheckNotes = true
            this.reportViewCheckNotesSpinning = true
            if(this.personnelList.length){
                this.$nextTick(()=>{
                    setTimeout(()=>{
                        //console.log('点击审评报告在审评报告查看审评记录0',this.finalCheckNotesList)
                        this.finalCheckNotesList = this.finalCheckNotesList.map((item,index)=>{return{...item,textlength:document.getElementById('reportViewFmsnr'+index).offsetHeight > 135?true:false}})
                        this.reportViewCheckNotesSpinning = false
                        //console.log('点击审评报告在审评报告查看审评记录',this.finalCheckNotesList)
                    },200)
                })
            }else{
                this.getPersonnelData()
            }
        },
        finalCheckDeleteClick(row){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                content: h => <div style="color:red;font-size:18px;">提示：附件也会删除</div>,
                onOk() {
                    jcbjdeleteJcdd({id:row.dd.id}).then(res=>{
                        if(res.code == 200){
                            that.getCheckNotesRight()
                            // that.getMaterialSummary(val,'删除')
                            that.$message.success('删除成功')
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        getFileSituation(){//查询文件情况
            this.checkNotesRightSpinning = true
            jcbjqueryJcqkList({sqsxid:this.currentRow.sqsxid,fuserid:this.currentPersonneData.fuserid}).then(res=>{
                if(res.code == 200){
                    this.fileSituationList = res.result
                    if(this.currentSteps == 2){
                        this.fileSituationList = this.fileSituationList.map((item,index)=>{return{...item,textlength:document.getElementById('fileSituationFqyzxqk'+index).offsetHeight > 135?true:false}})
                    }
                }else{
                    this.fileSituationList = []
                }
                this.checkNotesRightSpinning = false
            })
        },
        addFileSituationClick(row){//添加文件情况
            this.$refs.addFileSituationRef.getData({sqsxid:this.currentRow.sqsxid,fuserid:this.currentPersonneData.fuserid,...row})
            this.$refs.addFileSituationRef.visible = true
        },
        addFileSituationsuccess(){//添加文件情况成功
            this.getFileSituation()
        },
        FileSituationDeleteClick(row){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    jcbjdeleteJcqk({id:row.id}).then(res=>{
                        if(res.code == 200){
                            that.getFileSituation()
                            // that.getMaterialSummary(val,'删除')
                            that.$message.success('删除成功')
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        eyeCheckFile(trem,arr){//预览审评记录文件
            this.$refs.previewRecordFileRef.getData(trem,arr)
            this.$refs.previewRecordFileRef.previewVisible = true
        },
        fmsnrViewAllClick(item,index,val){
            if(val){
                this.fileSituationList.splice(index,1,{...item,viewAll:!item.viewAll})
            }else{
                this.finalCheckNotesList.splice(index,1,{...item,viewAll:!item.viewAll})
            }
        },
        deleteCheckFile(trem,tIndex,wj,item,index){//删除审评记录文件
            let wjSum = JSON.parse(JSON.stringify(wj)).filter((a,i)=>{return i !== tIndex})
            var itemSum = {
                ...item,
                wjList:wjSum,
            }
            //console.log('删除的时候我拿到最新的值',itemSum)
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcySqsxWjjldeleteFileById({id:trem.id}).then(res=>{
                        if(res.code == 200){
                            that.finalCheckNotesList.splice(index,1,itemSum)
                            that.$message.success('删除成功')
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        
        selectNoteItem(item){
            this.xcjcNoteIframeSrc = ''
            this.cjcNoteSpinning = true
            if(item.id){
                this.currentXcjcNoteState = item
                this.xcjcNoteIframeSrc = ''
                this.cjcNoteSpinning = true
                if(item.fwjlx == '.doc' || item.fwjlx == '.docx'){
                    openFileReadOnly({id:item.id}).then(res=>{
                        if(res.code == 200){
                            this.xcjcNoteIframeSrc = res.result.wordUrl
                        }else{
                            this.xcjcNoteIframeSrc = ''
                        }
                    })
                    this.cjcNoteSpinning = false
                }else{
                    this.xcjcNoteIframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+item.id
                    this.cjcNoteSpinning = false
                }
            }else{
                this.cjcNoteSpinning = false
            }
        },
        async selectmlNoteItem(item){
            this.isViewCheckNotes = false
            this.zlmlSpinning = true
            this.currentXcjcMLNoteState = item
            if(item.id){
                if(item.currentType == '企业申报材料'){
                    //console.log('我走到这里了-企业申报材料',item)
                    if(item.fclmc.indexOf('.doc') !== -1 || item.fclmc.indexOf('.docx') !== -1){
                        webOfficeApiopenQyFile({id:item.id}).then(res=>{
                            if(res.code == 200){
                                this.zlmlIframeSrc = res.result.wordUrl
                            }else{
                                this.zlmlIframeSrc = ''
                            }
                            this.zlmlSpinning = false
                        })
                    }else{
                        const data = await spcydownloadQysqclFile({id:item.id})
                        //console.log('我获取到了什么文件流？',data)
                        const realnameDate = this.realname+moment().format('YYYY年MM月DD日')
                        //console.log('水印文本',realnameDate)
                        this.zlmlIframeSrc = ''
                        this.previewPdfConstructor({
                            blob: data,
                            docTitle: 'window.open docTitle',
                            isAddWatermark: true, // 是否需要添加水印
                            watermark: { // watermark必填 里面可以不填
                                type: 'canvas',
                                text: realnameDate
                            }
                        })
                    }
                }else{
                    if(item.currentType == '审评报告模板' && item.fwjlx == '.doc' || item.fwjlx == '.docx'){
                        wjmbWebOfficeApiopenFileRead({id:item.id}).then(res=>{
                            if(res.code == 200){
                                this.zlmlIframeSrc = res.result.wordUrl
                            }else{
                                this.zlmlIframeSrc = ''
                            }
                            this.zlmlSpinning = false
                        })
                    }else if(item.fwjlx == '.doc' || item.fwjlx == '.docx'){
                        openFileReadOnly({id:item.id}).then(res=>{
                            if(res.code == 200){
                                this.zlmlIframeSrc = res.result.wordUrl
                            }else{
                                this.zlmlIframeSrc = ''
                            }
                            this.zlmlSpinning = false
                        })
                        
                    }else{
                        this.zlmlIframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+item.id
                        this.zlmlSpinning = false
                    }
                }
            }else{
                this.zlmlIframeSrc = ''
                this.zlmlSpinning = false
            }
            
        },
        previewPdfConstructor({ blob, docTitle, isAddWatermark = false, watermark: { type = 'text', text = 'WFT', image } }){
            try {
                const _self = this
                if(!blob) {
                    return console.error('[PDF Blob Is a required parameter]')
                }
                if(!isAddWatermark) { // 不添加水印
                    _self.preRightView(blob, docTitle)
                } else {
                    let bytes,imageType
                    if(type == 'image') {
                        if(!image) {
                        return console.error('["image" Is a required parameter]')
                        }
                        bytes = image.bytes
                        imageType = image.imageType
                    }
                    const map = {
                        // 'text': _self.addTextWatermark.bind(_self),
                        // 'image': _self.addImageWatermark.bind(_self),
                        'canvas': _self.addCanvasWatermark.bind(_self)
                    }
                    const pdfDoc =  PDFDocument.load(blob)
                    let params
                    if(type == 'text') params = { blob, pdfDoc, text, docTitle }
                    if(type == 'image') params = { blob, pdfDoc, bytes, imageType, docTitle }
                    if(type == 'canvas') params = { blob, pdfDoc, text, docTitle }
                    this.resultUrl = map[type](params)
                }
            } catch (error) {
                //console.log('Error fetching or adding watermark:', error);
                this.zlmlSpinning = false
            }
        },
        async addCanvasWatermark({ blob, pdfDoc1, text, docTitle }) {
            try {
                const pdfDoc =  await PDFDocument.load(blob)
                // 旋转角度大小
                const rotateAngle = Math.PI / 4;
            
                // labels是要显示的水印文字，垂直排列
                let labels = new Array();
                labels.push(text);
            
                const pages = pdfDoc.getPages()
            
                const size = pages[0].getSize()
            
                let pageWidth = size.width
                let pageHeight = size.height

                //console.log('画布的宽高，',size.width,'-',size.height)
                let canvas = document.createElement('canvas');
                let canvasWidth = canvas.width = pageWidth;
                let canvasHeight = canvas.height = pageHeight;
            
                const context = canvas.getContext('2d');
                context.font = "15px Arial";
            
                // 先平移到画布中心
                context.translate(pageWidth / 2, pageHeight / 2 - 250);
                // 在绕画布逆方向旋转30度
                context.rotate(-rotateAngle);
                // 在还原画布的坐标中心
                context.translate(-pageWidth / 2, -pageHeight / 2);
            
                // 获取文本的最大长度
                let textWidth = Math.max(...labels.map(item => context.measureText(item).width));
            
                let lineHeight = 15, fontHeight = 12, positionY, i
                i = 0, positionY = 0
                while (positionY <= pageHeight) {
                positionY = positionY + lineHeight * 5
                i++
                }
                canvasWidth += Math.sin(rotateAngle) * (positionY + i * fontHeight) // 给canvas加上画布向左偏移的最大距离
                //console.log('给canvas加上画布向左偏移的最大距离',Math.sin(rotateAngle) * (positionY + i * fontHeight))
                canvasHeight = 2 * canvasHeight
                for (positionY = 0, i = 0; positionY <= canvasHeight; positionY = positionY + lineHeight * 5) {
                // 进行画布偏移是为了让画布旋转之后水印能够左对齐;
                context.translate(-(Math.sin(rotateAngle) * (positionY + i * fontHeight)), 0);
                for (let positionX = 0; positionX < canvasWidth; positionX += 1.5 * textWidth) {
                    let spacing = 0;
                    labels.forEach(item => {
                    context.fillText(item, positionX, positionY + spacing);        
                    context.fillStyle = 'rgba(0, 0, 0, .2)'; // 字体颜色
                    spacing = spacing + lineHeight;
                    })
                }
                context.translate(Math.sin(rotateAngle) * (positionY + i * fontHeight), 0);
                context.restore();
                i++
                }
                // 图片的base64编码路径
                let dataUrl = canvas.toDataURL('image/png');
                // 使用Xhr请求获取图片Blob
                let xhr = new XMLHttpRequest();
                xhr.open("get", dataUrl, true);
                xhr.responseType = "blob";
                xhr.onload = res => {
                const imgBlob = res.target.response
                // 获取Blob图片Buffer
                imgBlob.arrayBuffer().then(async buffer => {
                    const pngImage = await pdfDoc.embedPng(buffer)
                    for(let i = 0; i < pages.length; i++) {
                    pages[i].drawImage(pngImage)
                    }
                    // 序列化为字节
                    const pdfBytes = await pdfDoc.save()
                    this.preView(pdfBytes, docTitle)
                })
                }
                xhr.send();
            } catch (error) {
                //console.log('Error fetching or adding watermark:', error);
                this.zlmlSpinning = false
            }
        },
        preView(stream, docTitle) {
            const blob = new Blob([stream], { type: 'application/pdf' });
            this.zlmlIframeSrc = URL.createObjectURL(blob);
            this.zlmlSpinning = false
        },
        noteDelete(val,type){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcySqsxWjjldeleteFileById({id:val.id}).then(res=>{
                        if(res.code == 200){
                            that.getNoteData(val,'删除')
                            // that.getMaterialSummary(val,'删除')
                            that.$message.success('删除成功')
                            if(type == '结论'){
                                that.programMemakeChange(that.selectReportItem)//生成审评报告
                            }else if(type == '缺陷'){
                                that.defectReportChange(that.selectReportItem)//生成缺陷报告
                            }
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        //--------------技术审评材料汇总
        getMaterialSummary(row,type){
            spcyqueryXcjcFileMl({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('技术审评材料汇总',res.result)
                    this.materialSummaryList = res.result[0].mcList
                    // if(type){
                    //     this.selectLastMeetingFile(row,type)
                    // }else{
                    //     this.selectLastMeetingFile()
                    // }
                }else{
                    this.$message.warning(res.message)
                }
                this.onSiteInspectionSpinning = false
            })
            // spcyqueryWjMlBySchyJc({sqsxid:this.currentRow.sqsxid}).then(res=>{
            //     if(res.code == 200){
            //         //console.log('审评组材料',res.result)
            //         this.firstMeetingInspectionTeamList = res.result
            //     }else{
            //         this.$message.warning(res.message)
            //     }
            // })
            // spcyqueryWjMlBySchyQy({sqsxid:this.currentRow.sqsxid}).then(res=>{
            //     if(res.code == 200){
            //         //console.log('企业材料目录',res.result)
            //         this.firstMeetingEnterpriseList = res.result.records
            //     }else{
            //         this.$message.warning(res.message)
            //     }
            // })
        },
        selectLastMeetingFile(row,type){
            if(type == '删除'){
                //console.log('我在删除文件',row)
                let num = ''
                this.currentLastMeetingData = {}
                this.materialSummaryList.forEach((item,index)=>{
                    if(row.index == index && item.wjList.length){
                        this.currentLastMeetingData = {...item,...item.wjList[0],index,tIndex:0}
                    }else if(item.wjList && item.wjList.length && num){
                        num = 1
                        this.currentLastMeetingData = {...item,...item.wjList[0],index,tIndex:0}
                    }
                })
                //console.log('我删除文件1',this.currentLastMeetingData)
            }else if(row){
                this.currentLastMeetingData = row
            }else{
                let num = ''
                this.materialSummaryList.forEach((item,index)=>{
                    if(item.wjList && item.wjList.length && !num){
                        num = 1
                        this.currentLastMeetingData = {...item,...item.wjList[0],index,tIndex:0}
                    }
                })
            }
            //console.log('我在末次会议材料汇总',this.currentLastMeetingData)
            this.lastMeetingSpinning = true
            this.lastMeetingIframeSrc = ''
            if(this.currentLastMeetingData.fwjlx == '.doc' || this.currentLastMeetingData.fwjlx == '.docx'){
                openFileReadOnly({id:this.currentLastMeetingData.id}).then(res=>{
                    if(res.code == 200){
                        //console.log('我一直在请求吗？',res.result.wordUrl)
                        this.lastMeetingIframeSrc = res.result.wordUrl
                    }else{
                        this.lastMeetingIframeSrc = ''
                    }
                    this.lastMeetingSpinning = false
                })
                
            }else{
                this.lastMeetingIframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.currentLastMeetingData.id
                this.lastMeetingSpinning = false
            }
        },
        satisfactionClick(){
            this.$refs.QRQueryResultsRef.visibleQRQrCode = true
            this.$refs.QRQueryResultsRef.getData({sqsxid:this.currentRow.sqsxid})
        },

        eventupdatedSuccess(){
            this.modalSpinningPrice = false
        },
        async tabPaneChange(val){
            if(val == '申请信息'  || val == '环节流转记录'){
                this.$refs.eventSetRef.getDatas({...this.currentRow,tabPaneActiveKey:val,borderisFalse:true})
                this.modalSpinningPrice = true
            }
            // if(val == '会议签到'){
            //     this.$nextTick(()=>{
            //         setTimeout(() => {
            //             this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
            //             this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
            //         }, 200);
            //     })
            // }
            this.currentNum2TabHange()
            if(val == '审评方案拟定'){
                this.$nextTick(()=>{
                    setTimeout(() => {
                        this.$refs.planProductionProductionRef.getData({
                            sqsxid:this.currentRow.sqsxid,
                            isTopTabs:true,
                            isActiveKey:'审评方案拟定',
                            isDisabled:true,
                            fhjmc:this.currentRow.fhjmc == '现场检查'?'技术审查':this.currentRow.fhjmc,
                            reserveBottom:35,
                            rightPreviewBoxH:window.innerHeight - 80,
                            rightContentPreviewBoxH:window.innerHeight - 90,
                        })
                    }, 200);
                })
            }
            if(val == '审评结论及其他说明' && this.InspectionReportStateData.state){
                this.$nextTick(()=>{
                    if(this.$refs.selectTemplateNoModelRef && this.$refs.selectTemplateNoModelRef.getSelectTemplate){
                        this.$refs.selectTemplateNoModelRef.getSelectTemplate({},'技术审评报告',this.selectReportItem.sqsxid,this.currentRow.fhbsxzt)
                        this.$refs.selectTemplateNoModelRef.selectTemplateVisible = true
                    }
                    
                })
            }
            if(val == '发现缺陷情况' && this.DefectReportStateData.state){
                this.$nextTick(()=>{
                    if(this.$refs.selectTemplateNoModel2Ref && this.$refs.selectTemplateNoModel2Ref.getSelectTemplate){
                        this.$refs.selectTemplateNoModel2Ref.getSelectTemplate({},'技术审评缺陷记录表',this.selectReportItem.sqsxid,this.currentRow.fhbsxzt)
                        this.$refs.selectTemplateNoModel2Ref.selectTemplateVisible = true
                    }
                })
            }
            this.guideFuntion()
        },
        stepsChange(val){
            //console.log(val)
            this.nextStepClick('',val)
        },
        async nextStepClick(val,num){
            if(this.currentRow.isZZState){
                //console.log('我是组长，我可以存步骤',this.currentRow.isZZState)
                // if(val == '上一步'){
                    await xcjcjdpreviousNode({sqsxid:this.currentRow.sqsxid,fjdzt:num}).then(res=>{
                        if(res.code == 200){
                            this.currentSteps = num
                        }else{
                            this.$message.warning(res.message)
                        }
                        // this.$nextTick(()=>{
                        //     this.getxcjcbgData()
                        //     if(this.currentSteps == 0){
                        //         this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
                        //     }else if(this.currentSteps == 3){
                        //         this.getAbsenceSituation()
                        //         this.getMaterialSummary()
                        //         this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
                        //     }else if(this.currentSteps == 4){
                        //         this.$refs.reimbursementRef.getData({sqsxid:this.currentRow.sqsxid,view:false,heightType:'isReviewVer'})
                        //         this.reimbursementKey = Date.now()
                        //     }
                        // })
                    })
                // }else{
                //     await xcjcjdnextNode({sqsxid:this.currentRow.sqsxid}).then(res=>{
                //         if(res.code == 200){
                //             this.currentSteps = num
                //         }else{
                //             this.$message.warning(res.message)
                //         }
                //         this.$nextTick(()=>{
                //             this.getxcjcbgData()
                //             if(this.currentSteps == 0){
                //                 this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
                //             }else if(this.currentSteps == 3){
                //                 this.getMaterialSummary()
                //                 this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
                //             }
                //         })
                //     })
                // }
            }else{
                this.currentSteps = num
                // this.$nextTick(()=>{
                //     if(this.currentSteps == 4){
                //         this.$refs.reimbursementRef.getData({sqsxid:this.currentRow.sqsxid,view:false,heightType:'isReviewVer'})
                //         this.reimbursementKey = Date.now()
                //     }
                // })
            }
            // if(this.currentSteps == 1 || this.currentSteps == 2){
            //     this.personneActiveKey = 0
            //     this.situationActiveKey = '技术审评笔记'
            //     this.currentPersonneData = this.personnelList[0]
            //     this.getNoteData()//审评笔记
            // }
            // if(num == 3){
            //     await this.getERWMData()
            //     this.getAbsenceSituation()
            // }
            if(this.currentSteps == 0){
                await this.currentNum0Change()
            }else if(this.currentSteps == 1){
                await this.currentNum1Change()
            }else if(this.currentSteps == 2){
                await this.currentNum2Change()
            }else if(this.currentSteps == 3){
                await this.currentNum3Change()
            }else if(this.currentSteps == 4){
                await this.currentNum4Change()
            }
            await this.guideFuntion()
        },
        //--------------描述模板---------
        getDescribeData(pagination,val,fmbly){
            this.describeLoading = true
            spcygetJcqkzgMb({...pagination,sqsxid:this.selectReportItem.sqsxid,fmbnr:val,fmbly:fmbly}).then(res=>{
                if(res.code == 200){
                    //console.log('审评情况描述----------',res.result.records)
                    if(res.result.records.length){
                        res.result.records.unshift({id:'-1',fmbnr:'情况专述',fdycs:'调用次数',})
                    }
                    this.describeList = res.result.records
                    this.totalDescribe = res.result.total
                    this.inputSearchKey = Date,now()
                    this.drawerKey = Date,now()
                    this.describeLoading = false
                    this.paginationKey = Date,now()
                }else{
                    this.$message.warning(res.message)
                    this.describeLoading = false
                }
                this.reportTabKey = Date.now()
            })
        },
        fmblyChange(){
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.getDescribeData(this.paginationDescribe,this.fmbnrSearch,this.fmbly)
            

        },
        selectDescribe(){
            this.drawerVisible = true
            this.fmbnrSearch = ''
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.getDescribeData(this.paginationDescribe,this.fmbnrSearch,this.fmbly)
        },
        addDescribe(){
            if(this.selectReportItem.fjcqkzs){
                spcyaddJcqkzsMb({sqsxid:this.selectReportItem.sqsxid,fmbnr:this.selectReportItem.fjcqkzs}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                this.$message.warning('请先输入审评情况描述')
            }
            
        },
        paginationChange(val,size){
            //console.log(val,size)
            this.paginationDescribe.pageNo = val
            this.paginationDescribe.pageSize = size
            this.getDescribeData(this.paginationDescribe,this.fmbnrSearch,this.fmbly)
            this.getSituationHistory()
            this.getProblemBase()
            this.getQueryTerms(this.chapterRow)
            this.getReportTemplateData(this.reportName)
            this.drawerKey = Date.now()
        },
        onSearchDescribe(val){
            this.fmbnrSearch = val
            this.getDescribeData(this.paginationDescribe,val,this.fmbly)
        },
        selelctDescribeText(val){
            this.selectReportItem.fjcqkzs = val
            this.drawerVisible = false
            this.reportTemplateVisible = false
        },
        deleteDescribe(val){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                    onOk() {
                        spcydeleteJcyj({id:val.id}).then(res=>{
                            if(res.code == 200){
                                that.getDescribeData(that.paginationDescribe,that.fmbnrSearch,that.fmbly)
                                that.getReportTemplateData(that.reportName)
                                that.$message.success(res.message)
                            }else{
                                that.$message.warning(res.message)
                            }
                        })
                    }
                })
        },

        //----------获取章节
        // getOverallSituation(val,index){
        //     spcyqueryXcjczjByNowUser({sqsxid:val.sqsxid}).then(res=>{
        //         if(res.code == 200){
        //             //console.log('获取章节----------',res.result.zjList)
        //             this.overallNum.hjSize = res.result.hjSize
        //             this.overallNum.wcSize = res.result.wcSize
        //             this.overallNum.wwcSize = res.result.wwcSize
        //             this.chapterList = res.result.zjList
        //             this.chapterRow = res.result.zjList.length?{...res.result.zjList[index?index:0],index:index?index:0}:{}
        //             this.getQueryQuestions(this.chapterRow)
        //             this.overallKey = Date.now()
        //         }else{
        //             this.$message.warning(res.message)
        //         }
        //         this.reportTabKey = Date.now()
        //     })
        // },
        // completeAllProjectClick(){//完成所有审评项目
        //     flfgverifyXcjczjWc({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
        //         if(res.code == 200){
        //             //console.log(res.result)
        //             let index = 0
        //             if(res.result && res.result.id){
        //                 this.chapterList.forEach((item,index)=>{
        //                     if(item.id == res.result.id){
        //                         //console.log('我在这一项',index)
        //                         this.chapterRow = {...item,index:index}
        //                         this.getQueryQuestions(this.chapterRow)
        //                     }
        //                 })
        //                 this.$message.warning('请先完成所有必填项')
        //             }else{
        //                 flfgxcjczjplwc({sqsxid:this.selectReportItem.sqsxid}).then(res1=>{
        //                     if(res.code ==200){
        //                         this.$message.success(res1.message)
        //                         // this.getOverallSituation(this.selectReportItem)
        //                         this.getQueryQuestions(this.chapterRow)
        //                     }else{
        //                         this.$message.warning(res1.message)
        //                     }
        //                 })
        //             }
        //         }else{
        //             this.$message.warning(res.message)
        //         }
        //     })
        // },
        getSituationHistory(){
            this.situationLoading = true
            this.chapterdrawerKey = Date.now()
            this.inputSearchKey = Date.now()
            spcygetXcjczjMsmbList({
                ...this.paginationDescribe,
                fxcjczjid:this.chapterRow.id,
                sqsxid:this.currentRow.sqsxid,
                fmbly:this.chapterRadio,
                fmbnr:this.searchSituationText,
            }).then(res=>{//获取情况描述
                if(res.code == 200){
                    //console.log('获取情况描述-------------',res.result.records)
                    if(res.result.records.length){
                        res.result.records.unshift({id:'-1',fmbnr:'描述模板',fdycs:'调用次数',})
                    }
                    this.situationList = res.result.records
                    this.totalDescribe = res.result.total
                }else{
                    this.$message.warning(res.message)
                }
                this.situationLoading = false
            })

        },
        selectSituationText(name,value,id,index,item){
            spcyselectHistoryMsmb({id:item.id}).then(res=>{
                if(res.code == 200){

                }else{}
            })
            //console.log(name,value,id,index)
            this.situationDescriptionVisible = false
            this.savechapter(name,value,id,index)
        },
        onSearchSituation(val){
            this.searchSituationText = val
            this.getSituationHistory()
        },
        //选择章节
        fzjmcClick(row,index){
            //console.log(row)
            this.chapterRow = {...row,index:index}
            // this.getQueryQuestions(this.chapterRow)
        },
        //完成状态
        chapterStatusChange(row,index){
            //console.log(row)
            if(row.fwczt == '未完成'){
                flfgxcjczjwc(row).then(res=>{
                    if(res.code == 200){
                        // this.getOverallSituation(this.selectReportItem,index)
                        // this.getQueryQuestions(this.chapterRow)
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                flfgxcjczjcxbj(row).then(res=>{
                    if(res.code == 200){
                        // this.getOverallSituation(this.selectReportItem,index)
                        // this.getQueryQuestions(this.chapterRow)
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
            
            
            // spcyupdatwXcjczj(row).then(res=>{
            //     if(res.code == 200){
            //         this.getOverallSituation(this.currentRow,index)
            //         this.$message.success(res.message)
            //     }else{
            //         this.$message.warning(res.message)
            //     }
            // })
        },
        chapterRadioChange(){//选择情况描述的类型
            this.getSituationHistory()
        },
        chapterTabPaneChange(){//选择章节情况

        },
        //选择情况描述
        situationClick(){
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.situationDescriptionVisible = true
            this.getSituationHistory()
        },
        //保存情况描述
        savechapter(name,value,id,index){
            let data = {id:id}
            data[name] = value
            spcyupdatwXcjczj(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                }else{
                    this,$message.warning(res.message)
                }
                // this.getOverallSituation(this.selectReportItem,index)
                // this.getQueryQuestions(this.chapterRow)
            })
        },
        //获取发现缺陷情况人员
        getFxryList(){
            this.addwtSpinning = true
            spcyfxryList({sqsxid:this.selectReportItem.sqsxid,}).then(res=>{
                if(res.code == 200){
                    //console.log('获取发现人员列表',res.result.list)
                    if(res.result && res.result.list && res.result.list.length){
                        this.PersonnelDiscoveredProblemList = res.result.list
                        this.PersonnelDiscoveredRow = res.result.list[0]
                    }else{
                        this.PersonnelDiscoveredProblemList = []
                        this.PersonnelDiscoveredRow = {}
                    }
                    this.nowUserId = res.result.nowUserId
                    // this.chapterRow = res
                }else{
                    this.PersonnelDiscoveredProblemList = []
                    this.nowUserId = ''
                    this.PersonnelDiscoveredRow = {}
                }
                this.addwtSpinning = false
                this.getQueryQuestions(this.PersonnelDiscoveredRow)
            })
        },
        //选择搜索条件搜索问题
        PersonnelDiscoveredChange(val){
            this.PersonnelDiscoveredProblemList.forEach((item,index)=>{
                if(item.userid == val){
                    this.PersonnelDiscoveredRow = item
                    this.getQueryQuestions(this.PersonnelDiscoveredRow)
                }
            })
        },
        chapterIssuesChange(item,index,val){//修改问题具体项发现人员
            this.severityChange(item.wt,'ffxryid',val.join(','))
        },
        fxwtForderBlur(wt,val){//修改已完成问题序号
            flfgupdateWtOrder({id:wt.id,forder:val}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.completedIssueKey = Date.now()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        ProblemCompletedClick(name,item){//完成问题/重新编辑问题
            if(name == '完成'){
                flfgfxwtDjwc({id:item.wt.id}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.getQueryQuestions()
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                flfgfxwtCxbj({id:item.wt.id}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.getQueryQuestions()
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
        },
        //-------------发现缺陷情况
        getQueryQuestions(row,val){//查询发现缺陷情况
            flfgfxwtXmList({sqsxid:this.selectReportItem.sqsxid,}).then(res=>{
                if(res.code == 200){
                    //console.log('发现缺陷情况选择对应的技术审评项目列表',res)
                    this.fxwtXmList = res.result
                }else{
                    this.fxwtXmList = []
                }
            })
            if(!val){
                this.chapterIssuesSpinning = true
                this.chapterIssuesList = []
            }
            
            this.completedIssueTableConfig.paramet = {
                sqsxid:this.selectReportItem.sqsxid
            }
            this.completedIssueformItem = [{
                label: '发现人员',
                model: 'ffxryid',
                type:'Select',
                options:this.PersonnelDiscoveredProblemList.map((item,index)=>{
                    return{
                        label:item.name,
                        value:item.userid
                    }
                })
            }]


            // this.completedIssueKey = Date.now()
            flfgqueryWwcFxwtBySqsxId({sqsxid:this.selectReportItem.sqsxid,}).then(res=>{//未完成
                if(res.code == 200){
                    //console.log('查询发现缺陷情况',res.result.records)
                    this.chapterIssuesList = res.result.records
                    if(!val){
                        this.chapterIssuesKey = Date.now()
                    }
                }else{
                    this.chapterIssuesList = []
                    this.$message.warning(res.message)
                }
                if(!val){
                    this.problemTableKey = Date.now()
                }
                
                this.chapterIssuesSpinning = false
            })
            // flfgqueryYwcFxwtBySqsxId({sqsxid:this.selectReportItem.sqsxid,}).then(res=>{//已完成
            //     if(res.code == 200){

            //     }else{

            //     }
            // })
            // spcyqueryListXcjcwtBySqsxId({sqsxid:this.selectReportItem.sqsxid,ffxryid:row.userid}).then(res=>{
            //     if(res.code == 200){
            //         //console.log('查询发现缺陷情况',res.result.records)
            //         this.chapterIssuesList = res.result.records
            //         this.chapterIssuesKey = Date.now()
            //     }else{
            //         this.chapterIssuesList = []
            //         this.$message.warning(res.message)
            //     }
            //     this.problemTableKey = Date.now()
            //     this.chapterIssuesSpinning = false
            // })
        },
        //查询历史库列表
        getProblemBase(){
            spcyqueryPageXcjcHistoryTkListByXcjcZjId({
                ...this.paginationDescribe,
                sqsxid:this.currentRow.sqsxid,
                fxcjczjid:this.chapterRow.id,
                gjz:this.searchProblemHistoryText
            }).then(res=>{
                if(res.code == 200){
                    //console.log('查询问题历史库',res.result.records)
                    if(res.result.records.length){
                        res.result.records.unshift({id:'-1',fzdyznr:'问题内容',fzdyzh:'对应依据',})
                    }
                    this.problemHistoryList = res.result.records
                    this.totalDescribe = res.result.total
                    this.problemHistoryKey = Date.now()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //打开问题历史库
        problemBaseSelect(){
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.problemHistoryVisible = true
            this.getProblemBase()
        },
        //搜索历史库
        onSearchProblemHistory(val){
            this.searchProblemHistoryText = val
            this.getProblemBase()
        },
        //选择问题历史库
        SelectproblemHistory(row){
            spcyselectHistoryXcjcwt({fxcjczjid:this.chapterRow.id,id:row.id, sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.problemHistoryVisible = false
                    this.getQueryQuestions(this.PersonnelDiscoveredRow)
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //添加问题打开弹窗选人
        addproblem(){
            this.$refs.addProblemRef.visible = true
            this.$refs.addProblemRef.getData(this.PersonnelDiscoveredProblemList,this.nowUserId)
        },
        
        //添加问题
        addProblemChange(val){
            let that = this
            spcyaddXcjcWt({sqsxid:that.selectReportItem.sqsxid,ffxryid:val}).then(res=>{
                this.$refs.addProblemRef.visible = false
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.getQueryQuestions(that.PersonnelDiscoveredRow)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //组员添加问题
        addzyproblem(){
            let that = this
            spcyaddXcjcWt({sqsxid:that.selectReportItem.sqsxid,ffxryid:this.nowUserId}).then(res=>{
                this.$refs.addProblemRef.visible = false
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.getQueryQuestions(that.PersonnelDiscoveredRow)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //修改严重程度、发现人员和问题描述
        severityChange(rowWt,name,val){
            //console.log(rowWt)
            let data = {id:rowWt.id}
            data[name] = val?val:rowWt[name]
            spcyupdatwXcjcwt(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
                this.getQueryQuestions(this.PersonnelDiscoveredRow,true)
            })
        },
        //查询条款选择列表
        getQueryTerms(row){
            this.termItemLoading = true
            spcyqueryPageTkListByZjId({
                ...this.paginationDescribe,
                sqsxid:this.currentRow.sqsxid,
                fxcjczjid:row.id,
                gjz:this.searchTermItemText,
            }).then(res=>{
                if(res.code == 200){
                    if(res.result.records.length){
                        res.result.records.unshift({id:'-1',fzdyznr:'条款内容与审评要点',fzdyzh:'对应依据',})
                    }
                    this.termItemList = res.result.records
                    this.totalDescribe = res.result.total
                }else{
                    this.$message.warning(res.message)
                }
                this.termItemLoading = false
            })
        },
        //选择条款
        selectTermItem(item,trem){
            // this.currentTerms = {item:item.wt,trem:trem}
            // this.getQueryTerms(this.chapterRow)
            // this.termItemVisible = true
            //console.log(item)
            //console.log(trem)
            this.$refs.chooseTermsRef.getData({...item,...trem,sqsxid:this.selectReportItem.sqsxid})
            this.$refs.chooseTermsRef.visible = true
        },
        chooseTermsSuccess(){
            this.getQueryQuestions(this.PersonnelDiscoveredRow)
        },
        //条款搜索条件
        onSearchTermItem(val){
            this.searchTermItemText = val
            this.getQueryTerms(this.chapterRow)
        },
        //在列表上选择条款
        SelectTermItemItem(row){
            if(this.currentTerms.trem.ftkid){
                spcyagainXcjcwttk({ftkid:row.id,id:this.currentTerms.trem.id}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        // this.getQueryQuestions(this.chapterRow)
                        this.termItemVisible = false
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                spcyaddXcjcwttk({ftkid:row.id,fxcjcwtid:this.currentTerms.item.id,sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        // this.getQueryQuestions(this.chapterRow)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
        },
        deleteWTClick(row){//删除问题
            //console.log('删除问题',row)
            let that = this
            this.$confirm({
                title:'您确认删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcydeleteXcjcwt({id:row.wt.id}).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                            that.getQueryQuestions(that.PersonnelDiscoveredRow)
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                }
            })
        },
        //删除条款
        deleteTermItem(row){
            let that = this
            this.$confirm({
                title:'您确认删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcydeleteXcjcwttk({id:row.id}).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                            that.getQueryQuestions(that.PersonnelDiscoveredRow)
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                }
            })
            
        },
        //生成结论
        generateConclusion(name,value){
            spcygenerateXcjcConclusion({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('生成结论',res)
                    this.selectReportItem[name] = res.result.conclusion
                    this.selectReportItem.fjcqxxm = res.result.fjcqxxm
                    this.reportValKey = Date.now()
                    this.saveData(name,res.result.conclusion)
                    this.saveData('fjcqxxm',res.result.fjcqxxm)
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //审评报告
        programMemakeChange(row,name){
            this.programDataSpinning = true
            spcygetXcjcbgFile({sqsxid:row.sqsxid}).then(res=>{
                //console.log('我再获取审评报告',res)
                this.programData = res.result.length?res.result[0]:{}
                if(res.result.length){
                    if(this.programData.fwjlx == '.doc' || this.programData.fwjlx == '.docx'){
                        this.openFileClick(this.programData,1)
                    }else{
                        this.programDataiframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.programData.id
                        this.programDataSpinning = false
                    }
                    this.iframeKey = Date.now()
                    
                }else{
                    this.$nextTick(()=>{
                        setTimeout(()=>{
                            this.$refs.selectTemplateNoModelRef.getSelectTemplate({},'技术审评报告',row.sqsxid,this.currentRow.fhbsxzt)
                            this.$refs.selectTemplateNoModelRef.selectTemplateVisible = true
                        },200)
                    })
                    this.programDataSpinning = false
                }
                this.programKey = Date.now()
                // this.getMaterialSummary()
                this.reportTabKey = Date.now()
            })
        },
        defectReportChange(row){//生成缺陷报告
            this.defectReportSpinning = true
            spcygetXcjcqxbgFile({sqsxid:row.sqsxid}).then(res=>{
                this.defectReportData = res.result.length?res.result[0]:{}
                if(res.result.length){
                    if(this.defectReportData.fwjlx == '.doc' || this.defectReportData.fwjlx == '.docx'){
                        this.openFileClick(this.defectReportData,2)
                    }else{
                        this.defectReportDataiframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.defectReportData.id
                        this.defectReportSpinning = false
                    }
                    this.iframeKey = Date.now()
                }else{
                    this.$nextTick(()=>{
                        setTimeout(()=>{
                            if(this.$refs.selectTemplateNoModel2Ref && this.$refs.selectTemplateNoModel2Ref.getSelectTemplate){
                                this.$refs.selectTemplateNoModel2Ref.getSelectTemplate({},'技术审评缺陷记录表',row.sqsxid,this.currentRow.fhbsxzt)
                                this.$refs.selectTemplateNoModel2Ref.selectTemplateVisible = true
                            }
                            
                        },200)
                    })
                    this.defectReportSpinning = false
                }
                this.defectReportKey = Date.now()
                // this.getMaterialSummary()
                this.reportTabKey = Date.now()
            })
        },
        
        
        openFileClick(val,num){//打开文件
            //console.log('打开文件',val,num)
            if(val.id){
                webOfficeApiopenFile({id:val.id}).then(res=>{
                    if(res.code == 200){
                        if(num == 1){
                            this.programDataiframeSrc = res.result.wordUrl
                        }else if(num == 2){
                            this.defectReportDataiframeSrc = res.result.wordUrl
                        }else if(num == 3){
                            this.xcjcbjiframeSrc = res.result.wordUrl
                        }
                        this.iframeKey = Date.now()
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.programDataSpinning = false
                    this.defectReportSpinning = false
                })
            }
            
        },

        refreshFile(){//刷新
            
            if(this.currentSteps == 1){
                this.xcjcbjChange(this.selectReportItem)
            }else{
                if(this.activeKey == '审评结论及其他说明'){
                    this.programMemakeChange(this.selectReportItem)
                }else if(this.activeKey == '发现缺陷情况'){
                    this.defectReportChange(this.selectReportItem)
                }
            }
            
            
        },

        // downloadFiles(val){//下载
        //     //console.log(val)
        //     var that = this
        //     var fileName = val.fwjccmc
        //     let param = { fywflcode:'001002',id:val.id,sqsxid:this.currentRow.sqsxid}
        //     spcySqsxWjjlgetLocalFileById(param).then((data) => {
        //         if (!data) {
        //             that.$message.warning('文件下载失败')
        //         return
        //         }
        //             let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf(val.fwjlx)] }))
        //             let link = document.createElement('a')
        //             link.style.display = 'none'
        //             link.href = url
        //             link.setAttribute('download', fileName + val.fwjlx)
        //             document.body.appendChild(link)
        //             link.click()
        //             document.body.removeChild(link) //下载完成移除元素
        //             window.URL.revokeObjectURL(url) //释放掉blob对象
        //     })
        // },
        
        changeFileNameClick(row){
            this.changeFileNameVal = row.fwjxsmc
            this.changeFileNamevisible = true
        },
        changeFileNameHandleOk(){
            spcySqsxWjjlmodifyWjMc({id:this.currentXcjcNoteState.id,fwjxsmc:this.changeFileNameVal}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.getNoteData(this.currentXcjcNoteState)
                    this.changeFileNamevisible = false
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        reEdit(){//重新编辑
            let data = {
                id:this.currentSteps == 1?this.xcjcbjData.id:this.activeKey == '审评结论及其他说明'?this.programData.id:(this.activeKey == '发现缺陷情况'?this.defectReportData.id:'')
            }
            againEditPdfOnlineFile(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        saveFiles(){//保存
            let data = {
                id:this.currentSteps == 1?this.xcjcbjData.id:this.activeKey == '审评结论及其他说明'?this.programData.id:(this.activeKey == '发现缺陷情况'?this.defectReportData.id:'')
            }
            getWebOfficeDownloadFile(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        generatePDFClick(){//生成PDF
            if(this.activeKey == '审评结论及其他说明'){
                this.programDataSpinning = true
            }else{
                this.defectReportSpinning = true
            }
            
            let data = {
                id:this.currentSteps == 1?this.xcjcbjData.id:this.activeKey == '审评结论及其他说明'?this.programData.id:(this.activeKey == '发现缺陷情况'?this.defectReportData.id:'')
            }
            getDocxToPdf(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
                this.programDataSpinning = false
                this.defectReportSpinning = false
            })
        },
        
        stampClick(){//盖章
            let data = {
                id:this.activeKey == '审评结论及其他说明'?this.programData.id:this.defectReportData.id
            }
            pdfFileHcCa(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        generatePDFStampClick(){//生成PDF并盖章
            let data = {
                id:this.activeKey == '审评结论及其他说明'?this.programData.id:this.defectReportData.id
            }
            getDocxToPdfAndGz(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        inspectionReportUploadCahnge1({file},val){//上传审评报告
            var that = this
            if(file.name.indexOf('.pdf') !== -1){
                const fileData = new FormData();
                fileData.append("file",file);
                fileData.append("fywflcode",'001002');
                fileData.append("sqsxid",this.selectReportItem.sqsxid);
                fileData.append("type",val);
                // fileData.append("fileid",this.programData.id);
                hbjcdelScSxFile(fileData).then(res => {
                    if(res.code !== 200){
                        that.$message.warning('请上传pdf文件或者联系管理员!')
                    }else{
                        that.programMemakeChange(that.selectReportItem)
                        that.$message.success('上传成功')
                    }
                    
                })
            }else{
                this.$message.warning('请上传pdf文件')
            }
            
        },
        reSelectTemplate(){//重新选择模板
            this.$refs.selectTemplateRef.getSelectTemplate(
                this.activeKey == '审评结论及其他说明'?this.programData:this.defectReportData,
                this.activeKey == '审评结论及其他说明'?'技术审评报告':'技术审评缺陷记录表',
                this.selectReportItem.sqsxid,this.currentRow.fhbsxzt)
            this.$refs.selectTemplateRef.selectTemplateVisible = true
        },
        //选择模板
        selectTemplateCompleteNoModel(val){
            if(val == '技术审评报告'){
                this.programMemakeChange(this.selectReportItem)
            
            }else{
                this.defectReportChange(this.selectReportItem)
            }
        },
        //旧
        getReportTemplateData(val){
            this.reportTemplateLoading = true
            if(val == '审评结论及其他说明'){
                spcygetJcbgMb({...this.paginationDescribe,sqsxid:this.currentRow.sqsxid,fmbnr:this.reportTemplateSearchText,fmbly:this.reportTemplatefmbl}).then(res=>{
                    if(res.code == 200){
                        if(res.result.records.length){
                            res.result.records.unshift({id:'-1',fzdyznr:'条款内容与审评要点',fzdyzh:'对应依据',})
                        }
                        this.reportTemplateList = res.result.records
                        this.totalDescribe = res.result.total
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.reportTemplateLoading = false
                })
            }else if(val == '发现缺陷情况'){
                spcygetQxbgMb({...this.paginationDescribe,sqsxid:this.currentRow.sqsxid,fmbnr:this.reportTemplateSearchText,fmbly:this.reportTemplatefmbly}).then(res=>{
                    if(res.code == 200){
                        if(res.result.records.length){
                            res.result.records.unshift({id:'-1',fzdyznr:'条款内容与审评要点',fzdyzh:'对应依据',})
                        }
                        this.reportTemplateList = res.result.records
                        this.totalDescribe = res.result.total
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.reportTemplateLoading = false
                })
            }
        },
        
        reportTemplateRadioChange(){
            this.getReportTemplateData(this.reportName)
        },
        onSearchReportTemplate(val){
            this.reportTemplateSearchText = val
            this.getReportTemplateData(this.reportName)
        },
        //报告模板
        SelectReportTemplate(val){
            this.reportName = val
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.getReportTemplateData(val)
            this.reportTemplateVisible = true
        },
        //存为报告模板
        saveReportTemplate(val,name){
            let data = {sqsxid:this.currentRow.sqsxid}
            data[name] = this.currentRow[name]
            if(this.currentRow[name]){
                if(val == '审评结论及其他说明'){
                    spcyaddJcbgMb(data).then(res=>{
                        if(res.code == 200){
                            this.$message.success(res.message)
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }else if(val == '发现缺陷情况'){
                    spcyaddQxbgMb(data).then(res=>{
                        if(res.code == 200){
                            this.$message.success(res.message)
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }
                
            }else{
                this.$message.warning('请先输入'+val)
            }
        },
        
        editClick(val){
            this.$refs.serverEditingRef.getData(val)
        },
        refreshChange(){
            this.getMaterialSummary()
        },
        //宣读审评纪律
        recitingDisciplineCahnge(val){
            this.$refs.recitingDisciplineRef.getData({sqsxid:this.currentRow.sqsxid,title:val})
            this.$refs.recitingDisciplineRef.visible = true
        },
        //选择模板
        selectTemplateComplete(val){
            this.getMaterialSummary()
        },
        initWjjlServe(val){//生成记录
            commoninitWjjl({sqsxid:this.selectReportItem.sqsxid,type:val}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    // this.getMaterialSummary()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        scwjFileCahnge(){//生成审评记录文件
            jcbjinitXcjcjlFile({sqsxid:this.currentRow.sqsxid,}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.getMaterialSummary()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //审评报告签字
        bgSignCahnge(){
            var that = this
            this.$confirm({
                title:'您确认要签字吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    initWjxcjcbgQz({sqsxid:that.currentRow.sqsxid}).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                            that.getMaterialSummary()
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
            
        },
        selectFileCahnge(val){//选择模板
            this.$refs.selectTemplateDownloadRef.getSelectTemplate({selectFileSaveType:'commoninitWjjl'},val,this.selectReportItem.sqsxid,this.selectReportItem.fhbsxzt)
            this.$refs.selectTemplateDownloadRef.selectTemplateVisible = true
        },
        //上传
        singleUploadCahnge({file},val){
            var that = this
            if(file.name.indexOf('.pdf') !== -1 ){
                const fileData = new FormData();
                fileData.append("file",file);
                fileData.append("fywflcode",'001002');
                fileData.append("sqsxid",this.currentRow.sqsxid);
                fileData.append("type",val);
                spcyuploadSqsxFile(fileData).then(res => {
                    if(res.code !== 200){
                        that.$message.warning('请上传pdf文件或者联系管理员!')
                    }else{
                        that.getMaterialSummary(this.currentRow)
                        that.getFirstMeetingData(this.firstMeetingActiveValue)
                        that.$message.success('上传成功')
                        if(val == '现场检查缺陷记录表'){
                            that.defectReportChange(that.selectReportItem)//生成缺陷报告
                        }else if(val == '现场检查报告'){
                            that.programMemakeChange(that.selectReportItem)//生成审评报告
                        }
                    }
                    
                })
            }else{
                this.$message.warning('请上传pdf文件')
            }
            
        },
        singleUploadCahnge1({file},val){
            var that = this
            const fileData = new FormData();
            fileData.append("file",file);
            fileData.append("fywflcode",'001002');
            fileData.append("sqsxid",this.currentRow.sqsxid);
            fileData.append("type",val);
            this.singleUploadLoading = true
            let hide = this.$message.loading('正在上传中',0)
            spcyuploadSqsxFile(fileData).then(res => {
                //console.log(res)
                setTimeout(hide, 10)
                if(res.code !== 200){
                    that.$message.warning('请上传pdf文件或者联系管理员!')
                    
                }else{
                    that.getNoteData()
                    that.$message.success('上传成功')
                }
                this.singleUploadLoading = false
                
            })
            
        },
        producerUpload({file},val){//
            var that = this
            const fileData = new FormData();
            fileData.append("file",file);
            fileData.append("fywflcode",'001002');
            fileData.append("sqsxid",this.currentRow.sqsxid);
            fileData.append("id",val.id);
            uploadPdfFileById(fileData).then(res => {
                if(res.code !== 200){
                    that.$message.warning('请上传pdf文件或者联系管理员!')
                }else{
                    that.getMaterialSummary(this.currentRow)
                    that.$message.success('上传成功')
                }
                
            })
        },
        viewFinalFileClick(trem){
            this.$refs.viewFinalFileRef.getData(trem)
            this.$refs.viewFinalFileRef.visible = true
        },
        //删除
        producerDelete(val){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcySqsxWjjldeleteFileById({id:val.id}).then(res=>{
                        if(res.code == 200){
                            that.getMaterialSummary(val,'删除')
                            that.$message.success('删除成功')
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
            
        },
        //查看pdf
        viewClick(val){
            this.$refs.serverEditingViewRef.getData({id:val.id,fwjlx:val.fwjlx})
            this.$refs.serverEditingViewRef.serverEditingVisible = true
        },
        packageDownloadClick(){//打包下载
            var fileName = '企业材料'
            spcydownZipZxclQy({sqsxid:this.currentRow.sqsxid}).then((data) => {
                if (!data) {
                    that.$message.warning('文件下载失败')
                return
                }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf('.zip')] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', fileName + '.zip')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
            })
        },
        taskAllocationClick(){//分配任务
            this.$emit('taskAllocationClick',this.reportList,this.currentRow.fhbsxzt == 1)
        },
        //下载模板
        downloadTemplateCahnge(val){
            var that = this
            var fileName = val+'模板'
            let param = { fywflcode:'001002',type:val,sqsxid:this.currentRow.sqsxid}
            spcydownloadSqsxFileMb(param).then((data) => {
                if (!data) {
                    that.$message.warning('文件下载失败')
                return
                }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf('.doc')] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', fileName + '.doc')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
            })
        },
        linkClick(){
            var link = document.createElement('a');
            link.target='_blank'
            link.href = bootConfig[process.env.NODE_ENV].EXTERNAL_ACCESS_URL2+process.env.BASE_URL+`businessManagementSatisfactionSurvey?obj=`+JSON.stringify({sqsxid:this.currentRow.sqsxid})|| "二维码生成中",
            link.click();
        },
        generateFilesClick(){//生成会议签到表
            sqsxYwxxHtmlToFileByXcjchy({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.getMaterialSummary(this.currentRow)
                    this.getFirstMeetingData(this.firstMeetingActiveValue)
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        signatureFormCahnge(val){//下载签字表
            if(val == '技术审评会议签到表'){
                sqsxYwxxdownHtmlToFileByXcjchy({sqsxid:this.currentRow.sqsxid}).then((data)=>{
                    if (!data) {
                        that.$message.warning('文件下载失败')
                        return
                    }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf('.docx')] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', val + '.docx')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
                })
            }else{
                sqsxYwxxdownHtmlToFileByXcjcjl({sqsxid:this.currentRow.sqsxid}).then((data)=>{
                    //console.log(data)
                    if (!data) {
                        that.$message.warning('文件下载失败')
                        return
                    }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf('.docx')] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', val + '.docx')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
                })
            }
        },
        downloadFiles(val){//下载
            var that = this
            
            var fileName = val.fwjxsmc?val.fwjxsmc:val.fwjccmc
            let param = { fywflcode:'001002',id:val.id,sqsxid:this.currentRow.sqsxid}
            spcySqsxWjjlgetLocalFileById(param).then((data) => {
                if (!data) {
                    that.$message.warning('文件下载失败')
                return
                }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf(val.fwjlx)] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', fileName + val.fwjlx)
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
            })
        },

        //提交技术审评任务
        submitOnSite(val){
            this.$emit('linkHandling',val)
        },
        fjcqkzsAfterBlur(name,value){
            this.saveData(name,value)
        },
        zjqkmsBlur(item,index,name,val){
            let data = {
                fsqsxid:this.selectReportItem.sqsxid,
                id:item.id,
                fjcms:val,
            }
            spcyupdateRyqkmsZjNr(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //保存
        saveData(name,value,obj){
            let data = {
                jobid:this.currentRow.jobid,
                sqsxid:this.currentRow.sqsxid,
                opinion:'',
                smgflag:'否',
                map:{}
            }
            if(name){
                data.map[name] = value
            } else if(obj){
                data.map = {...obj}
            } else{
                data.map = { ...this.currentRow,}
            }
            if(this.currentRow.fhbsxzt == 1){
                data.sqsxid = this.selectReportItem.sqsxid
                spcysaveJbxx(data).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.getReportDetails()
                })
            }else{
                spcysaveFlow(data).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.getReportDetails()
                    // this.successChange()
                })
            }
            
        },
        successChange(val){
            //console.log('到这里了吗？')
            if(val){
                this.refreshTable = Date.now()
            }else{
                this.$emit('reviseClick',{...this.currentRow,isSssignPersonnel:true,noFirstLoad:true})
            }
            
        },
        
    }
}
</script>
<style lang="less">
//1
.on-siteInspection-div-5{
    width: 100%;
    padding: 0px 5px 0px 5px;
    overflow-y: auto;
    // background-color: #fff;
    // .on-siteInspection-tabs{
    //     padding: 0 5px;
    //     background-color: #fff;
    //     position: relative;
    //     // top: 48px;
    //     top: 0;
    //     right: 0;
    //     // margin:0 10px;
    //     font-size: 20px !important;
    //     font-weight: 600 !important;
    //     .ant-tabs-bar{
    //         margin: 0;
    //     }
    //     .ant-tabs-nav .ant-tabs-tab{
    //         padding-top: 5px;
    //         padding-bottom: 5px;
    //         margin-right: 10px;
    //     }
    //     .ant-tabs-nav-container{
    //         height: 50px !important;
    //     }
    //     .ant-tabs-nav-scroll{
    //         padding-top: 10px;
    //         padding-left: 10px;
    //     }
    // }
    // .ant-tabs-tab-active{
    //     font-size: 16px;
    //     font-weight: 600 !important;
    // }
    // .ant-tabs-tab{
    //     font-size: 16px;
    //     font-weight: 600 !important;
    //     line-height: 28px !important;
    //     border-radius: 10px 10px 0 0 !important;
    // }
    // .ant-tabs-tab-active{
    //     background-color: #5ca3e5 !important;
    //     color: #fff !important;
    //     border-color: #5ca3e5 !important;
    //     box-shadow: 0px 0px 12px 0px #5ca3e5;
    // }
    // .on-siteInspection-content{
    //     margin-top: 10px;
    //     height: calc(100vh - 145px);
    //     overflow-y: auto;
    //     box-shadow: 0px 0px 12px 0px #5ca3e5;
    // }
    .on-siteInspection-top-tabs{
        .ant-tabs-tab{
            font-size: 18px !important;
        }
    }
    .ant-steps-item-title{
        font-weight: 600 !important;
        font-size: 22px;
    }
    .sceneInspect-left-bgBox{
        width: 10%;
        border: 1px solid #d9d9d9;
        margin-right: 5px;
        background-color: #fff;
        
        .left-bgBox-item{
            padding: 5px;
            padding-left: 8px;
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 5px;
            border: 1px solid #d9d9d9;
            border-radius: 15px;

        }
        .select-left-bgBox-item{
            background-image: linear-gradient(to bottom, #e7f3ff, #fff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff);
            background-size: 100% 100% !important;
            border: 2px solid #ff9200;
            color: #38f;
        }
    }
    .onSiteInspection-btn-box{
        .tips-jb-box{
            position: absolute;
            z-index: 10;
            width: 20px;
            height: 20px;
            background: #f73131;
            text-align: center;
            line-height: 20px;
            color: #fff;
            font-weight: 600;
            font-size: 14px;
            border: 1px solid #fff;
            border-radius: 10px;
            border-bottom-right-radius: 0;
            top: 0px;
            left: -8px;
            box-shadow: 4px 4px 3px rgba(107, 103, 103, 0.8);
        }
    }
    .sceneInspect-right-zlckBox{
        width: 40%;
        border: 1px solid #d9d9d9;
        margin-left: 5px;
        .checkNotes-fileList-item-v{
            // border-bottom: 1px solid #d9d9d9;
            padding: 3px 10px;
            position: relative;
            background-color: #fff;
            border: 1px solid #1ab348;
            margin: 0 10px 10px 10px;
            border-radius: 10px;
            .report-view-fmsnr-v{
                max-height: 130px;
                overflow: hidden;
            }
            .fddmc-text-box{
                font-size: 18px;
                font-weight: 600;
                color: #242424;
            }
            .fjtk-text-box{
                font-size: 16px;
                font-weight: 600;
                color: #585555;
            }
        }
        .view-checkNotes-box-v{
            .checkNotes-fileList-box{
                display: flex;
                flex-wrap: wrap;
                
                .checkNotes-file-item{
                    width: 104px;
                    height: 104px;
                    margin: 4px;
                    border: 1px solid #d9d9d9;
                    border-radius: 4px;
                    overflow:hidden;
                    display:flex;
                    justify-content:center;
                    align-items:center;
                }
                .an-upload-list-item{
                    position: relative;
                    float: left;
                    width: 104px;
                    height: 104px;
                    margin: 0 3px 3px 0;
                    opacity: 1;
                }
                .an-upload-list-item-info{
                    position: relative;
                    width: 100%;
                    height: 100%;
                    overflow: hidden;
                }
                
                .an-upload-list-item:hover .an-upload-list-item-info:before{
                    position: absolute;
                    z-index: 5;
                    width: 100%;
                    height: 100%;
                    background-color: rgba(0,0,0,.5);
                    transition: all .3s;
                    content: " ";
                }
                
                .an-upload-list-item-actions{
                    z-index: 10;
                    width: 16px;
                    margin: 0 4px;
                    color: hsla(0,0%,100%,.85);
                    font-size: 18px;
                    cursor: pointer;
                    position: absolute;
                    top: 50%;
                    left: 23%;
                    white-space: nowrap;
                    transform: translate(-50%,-50%);
                    opacity: 0;
                    transition: all .3s;
                }
                .icon-v-nf{
                    padding: 0 10px;
                }
                .an-upload-list-item:hover .an-upload-list-item-actions{
                    opacity: 1;
                }
                
            }
        }
    }
    .left-bgBox-top{
        display: flex;
        align-items: center;
        font-size:18px;
        border-bottom:2px solid #d9d9d9;
        margin-bottom:10px;
        background-image: linear-gradient(to bottom, #e7f3ff, #fff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff);
        background-size: 100% 100% !important;
        padding:5px;
        .title{
            flex: 1;
            color:#38f;
            font-weight:600;
        }

    }
    .bgmc-bgBox-box{
        .title{
            display:inline-block;
            width:220px;
            white-space: nowrap;      /* 保持文本在一行，不换行 */
            overflow: hidden;         /* 隐藏超出容器的内容 */
            text-overflow: ellipsis;
        }
        
    }
    .on-siteInspection-content{
        overflow-y: auto;
        
        // margin: 5px;
        background-color: #fff;
        // border: 1px solid #38f;
        border-top: 0 !important;
        
        .situation-description-box{
            .situation-description-list{
                height:calc(100vh - 204px);
                overflow-y:auto;
            }
            .situation-tip{
                width:100%;
                text-align:right;
                display:inline-block;
            }
            .situation-item-box{
                margin-bottom:8px;
                .si-top-box{
                    display: flex;
                    align-items: flex-start;
                    background-image: linear-gradient(to bottom, #e7f3ff, #fff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff);
                    background-size: 100% 100% !important;
                    padding:8px;
                    border:1px solid #d9d9d9;
                    .situation-left-title{
                        display: inline-block;
                        background-color: #e6f7ff;
                        text-align: left;
                        font-weight: 600;
                        font-size: 16px;
                        font-family: simHei;
                        color: rgba(0, 0, 0, 0.85);
                        margin-right: 8px;
                    }
                }
                .situation-bottom-v{
                    border:1px solid #d9d9d9;
                    border-top:none;
                    padding:8px;
                }
            }
            
        }
    }
    .nextStep-box{
        display: flex;
        justify-content: space-between;
        align-items: center;
        // position: absolute;
        // width: calc(100% - 12px);
        // bottom: -50px;
        // left: 6px;
        // background-color: #fff;
        // border-top: 1px solid #d9d9d9;
        padding: 0px 0;
    }
    .top-nextStep-box{
        position: absolute;
        right: 0;
        top: -5px;
    }
    .steps-item-icon-box{
        width: 26px;
        height: 26px;
        border: 1px solid rgba(0, 0, 0, 0.25);
        line-height: 23px;
        border-radius: 50%;
        background-color: #fff;
        text-align: center;
        font-size: 16px;
    }
    .ant-steps-item-active{
        .steps-item-icon-box{
            border: 1px solid #2F54EB;
            background-color: #2F54EB;
            color: #fff;
        }
    }
    .ant-steps-item-finish{
        .steps-item-icon-box{
            color: #2F54EB;
            border: 1px solid #2F54EB;
        }
        
    }
    
}
//2
.on-siteInspection-div-5{
    .review-table{
        th{
            text-align: center;
            padding:10px 15px;
        }
        td{
            padding:10px 15px;
        }
    }
    th{
        padding: 10px;
        text-align: center;
    }
    td{
        padding:10px 15px;
    }
    .file-for-box{
        display: flex;
        flex-wrap: wrap;
        .toolbox-fileList-box{
            // width: 104px;
            // height: 98px;
            // margin: 10px;
            padding: 5px;
            margin: 5px;
            margin-left: 0;
            display: flex;
            // flex-direction: column;
            justify-content: center;
            overflow: hidden;
            border: 1px solid #d9d9d9;
            .fileList-icon-btn{
                // flex: 1;
                display: flex;
                justify-content: space-around;
                .toolbox-filePdf-icon-type{
                    font-size: 40px;
                    color: #229dfc;
                    display: inline-block;
                    margin-top: 8px;
                }
                .left-icon-btn,.right-icon-btn{
                    padding: 7px 0;
                    width: 15px;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                }
                .toolbox-delete-icon-type{
                    color: #ed5565;
                }
                .toolbox-eye-icon-type{
                    color: #1ab394;
                    display: inline-block;
                    margin-top: 8px;
                }
                .toolbox-download-icon-type{
                    color: #229dfc;
                }
                .toolbox-upload-icon-type{
                    color: #229dfc;
                    display: inline-block;
                    margin-top: 8px;
                }
            }
            .toolbox-file-coontern{
                display: flex;
                justify-content: center;
                align-items: center;
                padding: 0 3px;
                // height: 42px;
                .toolbox-file-name{
                    
                    // flex: 1;
                    text-align: center;
                    display: -webkit-box;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    -webkit-line-clamp: 2; /* 控制最大行数 */
                    -webkit-box-orient: vertical;
                }
            }
        }
        .select-last-meeting-box{
            background-image: linear-gradient(to bottom, #e7f3ff, #fff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff);
            background-size: 100% 100% !important;
            border: 3px solid #ff9200 !important;
        }
    }
    .file-for-v{
        width: 130px;
        height: 130px;
        border-radius: 2px;
        border: 1px solid #d9d9d9;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 5px;
        margin: 5px;
        .file-icon-box{
            display: flex;
            justify-content: space-evenly;
            .file-icon-v{
                font-size: 42px;
                color: rgb(24, 144, 255);
                padding: 7px 0;
            }
            .left-box{
                // width: 28px;
            }
            .right-box{
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                padding-bottom: 2px;
                .eye-icon-v{
                    font-size: 18px;
                    color: rgb(24, 144, 255);
                }
            }
            .fileicon-v{
                font-size: 18px;
                // color: rgb(24, 144, 255);
                color: #2F54EB;
            }
            .deleteicon-v{
                color: #ed5565;
            }
        }
        
        .name-fclmc-text{
            height: 60px;
            text-align: center;
            display:block;
            text-overflow: -o-ellipsis-lastline;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            // display: flex;
            // flex-direction: column;
            // justify-content: center;
            -webkit-line-clamp: 3;
            line-clamp: 3;
            -webkit-box-orient: vertical;
            font-size: 14px;
        }
    }
    .chapter-tabs{
        .ant-tabs-bar{
            border: 0px;
            margin: 0;
        }
        .ant-tabs-nav .ant-tabs-tab{
            margin-right: 10px;
        }
        .ant-tabs-nav-container{
            height: 50px !important;
        }
        .ant-tabs-nav-scroll{
            padding-top: 10px;
            padding-left: 10px;
        }
        .ant-tabs-nav .ant-tabs-tab{
            // padding: 10px;
            line-height: 40px !important;
            border-radius: 10px 10px 0 0 !important;
        }
        
        .ant-tabs-tab-active{
            background-color: #5ca3e5 !important;
            color: #fff !important;
            border-color: #5ca3e5 !important;
            box-shadow: 0px 0px 12px 0px #5ca3e5;
        }
        
        // .on-siteInspection-div-5 .chapter-tabs .ant-tabs-nav .ant-tabs-tab{
        //     padding: 3px 10px;
        // }
        
    }
    .chapter-tabs-content{
        // box-shadow: 0px 0px 12px 0px #5ca3e5 !important;
        // box-shadow: 0px 0px 12px -3px #69a3d9 !important;
        // border: 1px solid #38f;
        border-top: none;
        background-color: #fff;
        // margin: 5px;
        // padding: 10px;
        .chapterIssues-box{
            height: calc(100vh - 208px);
            overflow-y: auto;
        }
        .discover-problems-item-box{
            box-shadow: 0px 0px 2px 2px #caedff;
            border-radius: 5px;
            margin: 5px 5px 15px 5px;
            padding: 5px;
            .ant-select-disabled{
                color: rgba(0, 0, 0, 0.65) !important;
            }
            .problem-title{
                // background: rgba(0, 0, 0, 0.75);
                background: #faad14;
                color: #fff;
                padding: 0 5px;
                display: inline-block;
                margin-right: 8px;
                font-size: 18px;
                border-radius: 3px;
            }
            .fxqxgk-box-v{
                margin-left: 26px;
                margin-top: 5px;
                display: flex;
                justify-content: center;
                align-items: center;
            }
            .qxms-box{
                flex: 1;
                height:156.2px;
                border:1px solid #d9d9d9;
                // margin-right:3px;
                padding:5px;
            }
            .qxyj-box{
                flex: 1;
                // height:156.2px;
                border:1px solid #d9d9d9;
                // margin-left:3px;
                padding:5px;
                margin-top: 5px;
                .qxyj-content{
                    // height:126.2px;
                    // height:75px;
                    // overflow-y:auto;
                }
                .ant-empty-image{
                    height:42px !important;
                }
            }
            .wt-item-top-box{
                display:flex;
                align-items:center;
                .tips-box{
                    font-weight:600;
                    font-size:16px;
                    color:#ED5566;
                }
                .wt-item-title{
                    font-weight:600;
                }
            }
        }
    }
    .discover-problems-readOnly-box{
        height: calc(100vh - 427px);
        overflow-y: auto;
        margin: 5px;
        .problems-readOnly-item{
            margin-top: 8px;
            .item-title{
                font-size: 16px;
                font-weight: 600;
                color: #38f;
            }           
        }
        
    }
    .save-tips{
        color: #ed5565;
        font-weight: 600;
        background:#fff;
        padding: 5px;
    }
}
.plan-materials-full-modal{
    .ant-modal {
        max-width: 100%;
        top: 0;
        padding-bottom: 0;
        margin: 0;
    }
    .ant-modal-content {
        display: flex;
        flex-direction: column;
        height: calc(100vh);
    }
    .ant-modal-body {
        flex: 1;
        height: calc(100vh - 50px);
        padding:8px;
    }
}
.first-meeting-content-box{
    display: flex;
    .first-meeting-steps-box{
        width: 30%;
        min-width: 300px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 15px 0;
        padding-right: 20px;
        .steps-btn{
            height: 46px !important;
            font-size: 18px !important;
            border-radius: 50px;
            width: 330px;
        }
        .jgBox{
            // flex: 1;
            margin: 10px 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 38px;
            color: #1ab348;
        }
    }
    .first-meeting-right-box{
        flex: 1;
    }
    .content-tabs-item-box{
        display: flex;
        height: calc(100vh - 326px);
        overflow-y: auto;
        border: 1px solid rgb(51, 136, 255);
        border-top: none;
    }
}
.xcjvbj-coontent-v{
    .XcjcNote-item-box{
        font-weight: 600;
        color: #2F54EB;
    }
    .select-XcjcNote-box{
        background-image: linear-gradient(to bottom, #e7f3ff, #fff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff);
        background-size: 100% 100% !important;
        border: 3px solid #ff9200;
        color: #2F54EB !important;
    }
    .check-notes-top-btn{
        margin-bottom: 10px;
        display: flex;
        justify-content: flex-end;
    }
    .check-notes-box{
        height: calc(100vh - 235px);
        overflow-y: auto;
        padding-bottom: 8px;
        
        th{
            text-align: center;
            background-color: #dee5ed;
            color: #000;
            font-family: 仿宋_GB2312 !important;
            font-weight: 600 !important;
            min-width: 100px;
        }
        th,td{
            text-align: center;
            padding: 3px 8px;
            color: #000 ;
            height: 40px;
            line-height: 40px;
        }
        .checkNotes-fileList-box{
            display: flex;
            flex-wrap: wrap;
            .checkNotes-file-item{
                width: 104px;
                height: 104px;
                margin: 4px;
                border: 1px solid #d9d9d9;
                border-radius: 4px;
                overflow:hidden;
                display:flex;
                justify-content:center;
                align-items:center;
            }
            .an-upload-list-item{
                position: relative;
                float: left;
                width: 104px;
                height: 104px;
                margin: 0 3px 3px 0;
                opacity: 1;
            }
            .an-upload-list-item-info{
                position: relative;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }
            
            .an-upload-list-item:hover .an-upload-list-item-info:before{
                position: absolute;
                z-index: 5;
                width: 100%;
                height: 100%;
                background-color: rgba(0,0,0,.5);
                transition: all .3s;
                content: " ";
            }
            
            .an-upload-list-item-actions{
                z-index: 10;
                width: 16px;
                margin: 0 4px;
                color: hsla(0,0%,100%,.85);
                font-size: 18px;
                cursor: pointer;
                position: absolute;
                top: 50%;
                left: 23%;
                white-space: nowrap;
                transform: translate(-50%,-50%);
                opacity: 0;
                transition: all .3s;
            }
            .icon-v-nf{
                padding: 0 10px;
            }
            .an-upload-list-item:hover .an-upload-list-item-actions{
                opacity: 1;
            }
            
        }
        .left-check-notes-item{
            display: flex;
            align-items: flex-start;
            .text-v{
                flex: 1;
                text-align: left;
            }
            .check-notes-btn-box{
                font-size: 18px;
                .plus-circle-icon{
                    color: #1ab394 !important;
                }
                .edit-icon{
                    padding-left: 10px;
                    color: #5ca3e5;
                }
                .delete-icon{
                    padding-left: 10px;
                    color: #ED5566;
                }
            }
        }
        .select-left-check-item{
            background-image: linear-gradient(to bottom, #e7f3ff, #fff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff);
            background-size: 100% 100% !important;
            border: 2px solid #ff9200;
        }
    }
}

</style>